Quiz - Bottom Up Dynamic Programming

Q14. Bottom-Up DP #14

Instead of coding up the algorithm for LIS, a student does the following:

Creates a copy of ARR. Sorts the copy. Finds length of longest Common subsequence of ARR and sorted copy.

is the student correct?

Options:

  • only for some of the inputs.

  • yes the student is correct.

  • the solution is incorrect for all inputs.

  • this is not the right approach and one must always memorize the standard techniques

Ans given is: The student is correct.

But i think it’s wrong because we need to remove duplicates from the Copied Array.
Someone Please Look into it and get it correct on the website.
Ans Should be only for some inputs(where duplicates are not present).