A

Admin • 802.91K Points
Coach

Q. What is the time complexity of the brute force algorithm used to find the length of the longest palindromic subsequence?

  • (A) o(1)
  • (B) o(2n)
  • (C) o(n)
  • (D) o(n2)

Explanation by: Admin
in the brute force algorithm, all the subsequences are found and the length of the longest palindromic subsequence is calculated. this takes exponential time.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.