Dynamic programming optimizes the time complexity of finding the Longest Palindromic Substring from _______ to _______.

  • O(n log n), O(n)
  • O(n), O(n^2)
  • O(n^2), O(n log n)
  • O(n^2), O(n^2)
Dynamic programming optimizes the time complexity of finding the Longest Palindromic Substring from O(n^2) to O(n), making the algorithm more efficient by using the results of smaller subproblems to build up to the final solution.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *