Verizon Interview Question

Valid parenthesis and finding nth smallest/largest values in an array,