Next Permutation, Longest Valid Parentheses added