I cannot fully understand what a K ordered LCS is after reading the description and example . Can you explain in little more detail with few more example?
K Ordered LCS Question
hello @harshit.t2409
pls refer this article -> https://www.geeksforgeeks.org/longest-common-subsequence-with-at-most-k-changes-allowed/
sir , I tried to submit the code but compiler message is showing MLE
pls share ur updated code using coding blocks ide
declare dp as global vector it will pass.
@harshit.t2409 here some issue with compiler, so better use global array for that. The MLE will be gone after that.
Also it may give wrong answer because you need to find this answer for LCS for the base case when k=0 i.e. no modifications allowed.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.