Category Archives: Ds/Algos

interview questions based on data structures and algotrithms

Balanced Parentheses Algorithm

This is a classic example of how using an appropriate Datastructure can improve the quality of your algorithm. The Balanced Parentheses or Valid Parentheses is like this : Given a string containing ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, determine if the input string is valid or not. [(a+b)+c] is Valid where as (a+b)+c] is… Read More »