Microsoft Interview Question

1. find if a given string has valid paranthesis