Code Ninjas interview question

Given string is a Valid Parenthesis or not?