


For a given string “BaaB.”
3 possible palindrome partitioning of the given string are:
{“B”, “a”, “a”, “B”}
{“B”, “aa”, “B”}
{“BaaB”}
Every substring of all the above partitions of “BaaB” is a palindrome.
The first line contains a single integer ‘T’ denoting the number of test cases. The test cases follow.
The first line of each test case contains a string S.
Print each palindromic partition of the given string in a separate line. Print the substrings of a string separated by a single space.
You do not need to print. It has already been taken care of. Just implement the function.
1 <= T <= 5
0 <= |S|<= 12
Where ‘T’ denotes the number of test cases, and |S| denotes the length of string S.
Time Limit: 1 sec
Combination Sum III
Combination Sum III
Combination Sum III
Combination Sum III
Combination Sum III
Generate All Strings
Generate All Strings
Generate All Strings
Generate All Strings
8-Queen Problem
Sequential Digits
Expression Add Operators