문제

I read that the 'heap' is basically a binary tree. But this definition of Heap got me thinking about Java's Heap Space. Java's heap is a place where all the objects are created. But these objects surely are not sorted as per a binary tree? Because what would be the purpose of that?

도움이 되었습니까?

해결책

A binary heap is a heap data structure created using a binary tree while java heap is the memory used by JVM to manage the objects. You seems to be confused between these two concepts.

Datastructure such as PriorityQueue uses the binary heap tree concepts.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top