Skip to content

Instantly share code, notes, and snippets.

@ktraff
Created April 6, 2013 21:18
Show Gist options
  • Save ktraff/5327657 to your computer and use it in GitHub Desktop.
Save ktraff/5327657 to your computer and use it in GitHub Desktop.
maintaining the median with heaps 1
minHeap = new PriorityQueue();
maxHeap = new PriorityQueue(1, new MaxIntComparator());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment