fix signed/unsigned comparison
move BinaryHeap to C++11