Although i am using heaps to solve this problem.but i am getting TLE.Can anybody tell me the reason for same.Here is my code:-
Although i am using heaps to solve this problem.but i am getting TLE.Can anybody tell me the reason for same.Here is my code:-