various solution on palindromePartition.cc