Problem in K-ordered LCS

Giving wrong and in one test case.I have used dp concept with optimization in space. Please help me finding the error!

refer to this here