File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
algorithms/dynamic_programming/palindromic_substring Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ To recap, the solution to this problem can be divided into the following five ma
65651 . We count all one-letter substrings since any one-letter string is always a palindrome. These results are also stored
6666 in a lookup table to be used later.
67672 . Next, the algorithm checks all two-letter substrings and updates the count and the lookup table accordingly.
68- 3 . After these base cases, the algorithm checks all possible substrings of lengths greater than three . However, it only
68+ 3 . After these base cases, the algorithm checks all possible substrings of lengths greater than two . However, it only
6969 compares the first and last characters, and the rest of the substring is checked using the lookup table.
70704 . Whenever a palindromic substring is found, the count and the lookup table are updated accordingly.
71715 . After checking all possible substrings, the algorithm terminates and returns the count of the palindromic substrings.
You can’t perform that action at this time.
0 commit comments