coded cuuting rod and palindrome partition problems