Problems on Stacks.
Solve these and post the answers below.
Check for a Palindrome using a Stack
Eg "abcd" is not a palindrome, "aa", "abcba" are palindromes
Check for a proper parenthesis using a Stack
Eg "(1+2*(3+5)" is not properly parenthesized, "(1+2*(3-5)-9)", "()","a+[b-c)" are properly parenthesized.
0 Comments