Solve word segmentation and React palindrome validation | Intuit