@@coderVijay yes we can use minheap but I didn't use that because all youtuber use that and coping each other I made it different you will not find this solution in the whole youtube. And using minheap is not a big deal for me I can do that but I make it for everyone basically main focus is on simplicity and time complexity is O(k.n).
Sir , why we couldn't use minHeap and what is the time complexity of your solution
@@coderVijay yes we can use minheap but I didn't use that because all youtuber use that and coping each other I made it different you will not find this solution in the whole youtube. And using minheap is not a big deal for me I can do that but I make it for everyone basically main focus is on simplicity and time complexity is O(k.n).