Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

what is heap in javascript

 heap is a binary tree where each node is greater than both its leaves.
 The tree itself is complete or nearly complete at all times,
 so the heap is backed by a compact array.
 When values are added or removed, the tree rotates until the value has 
 sunk until its parent is greater, or floated until all children are less.
 
PREVIOUS NEXT
Tagged: #heap #javascript
ADD COMMENT
Topic
Name
5+9 =