luay-abdulraheem / balanced-brackets Goto Github PK
View Code? Open in Web Editor NEWBalanced Brackets: Used a Deque (instead of Stack) to solve the problem where each closing bracket will pop out the opening bracket of the same type. If the Stack ends up empty then we know that the brackets were balanced