```/**
*
* Problem Statement-
* [Find the Running Median](https://www.hackerrank.com/challenges/find-the-running-median)
*
*/
package com.javaaid.hackerrank.solutions.datastructures.heaps;

import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Scanner;

/**
* @author Kanahaiya Gupta
*
*/
public class FindTheRunningMedian {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PriorityQueue<Integer> highers = new PriorityQueue<Integer>();
PriorityQueue<Integer> lowers = new PriorityQueue<Integer>(new Comparator<Integer>() {
public int compare(Integer i1, Integer i2) {
return i2.compareTo(i1);
}
});
int N = sc.nextInt();
for (int i = 1; i <= N; i++) {
int number = sc.nextInt();
rebalance(lowers, highers);
}
sc.close();
}

private static double getMedian(PriorityQueue<Integer> lowers, PriorityQueue<Integer> highers) {
PriorityQueue<Integer> biggerHeap = lowers.size() > highers.size() ? lowers : highers;
PriorityQueue<Integer> smallerHeap = lowers.size() > highers.size() ? highers : lowers;
if (biggerHeap.size() == smallerHeap.size()) {
return ((double) (biggerHeap.peek() + smallerHeap.peek())) / 2d;
} else {
return biggerHeap.peek();
}
}

private static void rebalance(PriorityQueue<Integer> lowers, PriorityQueue<Integer> highers) {
PriorityQueue<Integer> biggerHeap = lowers.size() > highers.size() ? lowers : highers;
PriorityQueue<Integer> smallerHeap = lowers.size() > highers.size() ? highers : lowers;
if (biggerHeap.size() - smallerHeap.size() >= 2) {
}
}

private static void addNumber(int number, PriorityQueue<Integer> lowers, PriorityQueue<Integer> highers) {
if (lowers.size() == 0 || number < lowers.peek()) {