K-ordered LCS problem

https://ide.codingblocks.com/s/221927.What’s the problem with the code

@Naveen8377 hey
refer to this correct code