I am reading Danny Mittal’s Java code to solve the Email Filing problem in USACO 2022 February Silver Contest. I do not understand the following line:
PriorityQueue pq = new PriorityQueue<>(Comparator.comparingInt(j → folder[j]));
Specifically, what is the sorting criteria (j → folder[j])? Can anyone please provide more information about this part?
Thanks a lot.