solution for valid parentheses and still working on longest valid
parentheses