Implement min heap data structure in Javascript
Use heap to sort streams