Posts

Showing posts with the label Stack

Java Stack Hackerrank Solution

Image
 Java Stack Hackerrank Solution For Explanation watch video:  Sample Input {}() ({()}) {}( [] Sample Output true true false true Code: import  java.util.*; class  Solution{           public   static   void  main(String []argh)     {         Scanner sc =  new  Scanner(System.in);                   while  (sc.hasNext()) {             String input=sc.next();             System.out.println(valid(input));         }              }      static   boolean  valid(String s){    ...