Is it necessary to solve this question using heap,i have solved it using hashmap?If not then which is of better TC?
Please answer this
Hey @garganshul151
No its not necessary to solve it using PQ.
Share your code in CodingBlocks Ide so that I can tell u which is better in terms of TC
i have solved it using O(nk)β¦is it fine
see this one please is it fine