|
1 | | -/* |
2 | | - * Problem Statement: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. |
3 | | - * what is palindrome partitioning? |
4 | | - * - Palindrome partitioning means, partitioning a string into substrings such that every substring is a palindrome. |
5 | | - * Reference to know more about palindrome partitioning: |
6 | | - * - https://www.cs.columbia.edu/~sedwards/classes/2021/4995-fall/proposals/Palindrome.pdf |
7 | | - */ |
8 | | - |
9 | 1 | import{palindrome}from'./Palindrome' |
10 | 2 |
|
| 3 | +/* |
| 4 | + * Given a string s, return all possible palindrome partitionings of s. |
| 5 | + * A palindrome partitioning partitions a string into palindromic substrings. |
| 6 | + *@see https://www.cs.columbia.edu/~sedwards/classes/2021/4995-fall/proposals/Palindrome.pdf |
| 7 | + */ |
11 | 8 | constpartitionPalindrome=(s)=>{ |
12 | 9 | constresult=[] |
13 | 10 | backtrack(s,[],result) |
|