Palindromic Substrings - Medium Python 1-D Dynamic Programming Interview Problem | Unnested