In the bottom-up approach, why does the DP table store boolean values instead of current palindrome substring length? Isn’t it important for the DP table to store the current count for each subproblem? Also, a current length of 0 would easily tell us that a subproblem isn’t a palindromic substring.
Course: Grokking Dynamic Programming Patterns for Coding Interviews - Learn Interactively
Lesson: Longest Palindromic Substring - Grokking Dynamic Programming Patterns for Coding Interviews