Understanding the Heap Data Structure