A heap is a tree data structure where higher levels of the tree always contain greater (or lesser, if it\'s set up that way) values than lower levels. \"The\" heap is a bun
The heap (datastructure) is called like that because if you draw it it looks like a heap. The heap (memory) is called a heap because it is somehow organized but not fully. You accumulate data on a heap but you might have holes in it and irregularities. It's as if you'd put papers on a heap. Sometimes you remove one from the bottom. This has a form of a heap, i.e. somehow organized but not fully.