if i insert only a[0][0] first and then after every popping i insert left and down element of that element then i think space will beO(k) or some another method is there
and in my method what would be time complexity
Kth smallest element
@deepakjumani09
Your approach is amazing
Maybe better than currently known approaches
You need to avoid duplicates so take care of that
Time complexity would be klogk
Current best solution on GFG has nlogk
Amazing work buddy