Optimal Algorithmic Approach
Backtracking + palindrome DP table.
Core Invariants & Edge Cases
- Backtrack: at each start index try all end indices
- If s[start..end] is a palindrome, recurse from end+1
- Pre-compute palindrome check with DP for O(1) substring check