C++ STL algorithm next_permutation
Longest Palindrome Subsequence