In authors solution why do we take Mamimum Customer Id = 1600? ,whereas in constraints it is given to be less than 400. what is the complexity of authors solution ? it seems to me it should be m^2.
How to implement it with the heap.(I know how to insert and delete from a heap)
See https://github.com/nastra/hackerrank/blob/master/src/main/java/com/nastra/codechef/august/CleaningTables.java for a solution using a heap.