Skip to content

Commit 6e149e5

Browse files
Update algorithms/dynamic_programming/palindromic_substring/README.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 24025fa commit 6e149e5

File tree

1 file changed

+1
-1
lines changed
  • algorithms/dynamic_programming/palindromic_substring

1 file changed

+1
-1
lines changed

algorithms/dynamic_programming/palindromic_substring/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ To recap, the solution to this problem can be divided into the following five ma
6565
1. 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.
6767
2. 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.
7070
4. Whenever a palindromic substring is found, the count and the lookup table are updated accordingly.
7171
5. After checking all possible substrings, the algorithm terminates and returns the count of the palindromic substrings.

0 commit comments

Comments
 (0)