Build the PrimitiveMedium
Palindrome Partitioning
Write `partition(s)` returning every way to cut the string so that every piece is a palindrome.
partition("aab") -> [["a","a","b"], ["aa","b"]]
Generating all 2^(n-1) partitions and filtering is the slow answer. Cut only where the prefix is already a palindrome — an invalid prefix kills its entire subtree immediately, which is what backtracking is for.
What to expect: A timer starts when you begin. Edit the starter code, run it against the test suite as many times as you like, then finish when you're done. The reference solution and interviewer follow-up questions unlock only after you finish.