Netflix Interview Question

Check if a string has valid parenthesis