[Link to the code] (https://ide.codingblocks.com/s/282618)
Hostel Visit Why this code gives TLE?
@devmandal95 sorting takes O(nlogn) time and if you sort it for every query it will give TLE. Use priority_queue data structure instead
@devmandal95 sorting takes O(nlogn) time and if you sort it for every query it will give TLE. Use priority_queue data structure instead