my logic is correct but code is not getting complied
here is my code https://ide.codingblocks.com/s/321620
Kth smallest element in row and col wise sorted matrix
i have corrected the code but im not getting correct value at 4 and 7 at 4 it should give 24 but i get 20 and at 7 i t should give 30 but i get 25??v here is my code https://ide.codingblocks.com/s/321624
u should also take a visited array which will mark if the particular node is previously visited or not
is this correct now bro?
Make a visited array to check whether we visited the current element previously or not
bro i did it can u please tell me is it correct and is the time complexity is correct?
Yes, the code is looking correct to me. Time complexity should be O(klogn)