K ordered lcs TLE

https://ide.codingblocks.com/s/44393

k-ordered lcs in dp
its showing TLE
but if use array instead of h_map its showing AC
https://ide.codingblocks.com/s/44399

Hey Anoop, there is just a small issue in your base case’s condition. It should be if(i>=n||j>=m) instead of if(i==n||j==m).

same code passes for dp and ( i )will never cross n
i think problem is with hash_map
see second link
still TLE in first link