Intel Corporation Interview Question

Write a function to determine if a string of parentheses is valid and balanced