clean up longest valid parentheses, TODO more simple way
update permutations with a direct recursive way
update PermutationsII with a direct recursive way