Preparing for interviews? IDeserve team is here to help.
Create your profile
Create your profile, and here is what you will get:
1: Interview practice platform.
2: Once you are ready to take the interview, IDeserve team will help you get connected to the best job opportunities.
3: Personalized mentorship from IDeserve team once your interview process has started.
Creation of profile shouldn't take more than 2 minutes.
The solution is recursive where we find the palindromic substring of the string, add it to the output and recursively traverse for the remaining part of the string to find other possible palindromic substrings and hence partitions.
Steps: 1. If begin == end, print the current output string. 2. Loop for i = begin to end, if substring of input string from begin to i is a palindrome then add substring from begin to i to the output string and recursively call for rest of the substring from i+1 to end.
Support us by whitelisting IDeserve in your ad-blocker.