
Palindromic problem basically can be solved with 2D array and dynamica programming
Since we want to reuse the result for sub problems intead of repeative calculation
Example Solution:
https://github.com/Sylvia-YiyinShen/Algorithm/blob/master/DynamicProgramming/Q647PalindromicSubstrings%20.playground/Contents.swift

No comments:
Post a Comment