Create valid-parentheses.cpp

Need to record the sequence of left parentheses to make a pair.