Programming question - check if string has balanced brackets, firstly with "()" only and thereafter adding all other brackets such as "[]{}<>".
Interview Answers
Anonymous
2 Jun 2022
this is valid parenthesis on leetcode
7
Anonymous
4 Feb 2023
Use a stack and push opening parentheses into stack and pop when u get a closing one and at last check if the stack is empty if yes its balanced else not.
Anonymous
28 Aug 2022
Use hashmap to identify the open parentheses to close parentheses