Code Ninjas Interview Question

Given string is a Valid Parenthesis or not?