TiVo Interview Question

Q. Find whether a given string consisting of parenthesis is a valid parenthesis block or not?