HashedIn by Deloitte Interview Question

To check whether a string is of balanced parentheses