Skip to content

Instantly share code, notes, and snippets.

@ktraff
Created April 6, 2013 21:27
Show Gist options
  • Save ktraff/5327689 to your computer and use it in GitHub Desktop.
Save ktraff/5327689 to your computer and use it in GitHub Desktop.
maintain the median with heaps 2
import java.util.Comparator;
public class MaxIntComparator implements Comparator {
@Override
public int compare(Integer o1, Integer o2) {
return o2 - o1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment