Top K Votes
Given a list of votes of pairs. Return top k votes up to a certain timestamp. TreeSet When need this kind floor/ceiling type of operations, considering using tree set. lower()/higher()/headSet()/tailSet() Use priority queue to find top k. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To […]