Fix bug in binary heap, synchronize heap code in ch7 and app2