Heap (Max And Min) & Tries
Heap Heap is a Tree Type data structure that has a complete set of nodes. Heaps are used in store array. What so special about Heaps is that every time we inserted value to it, it used its own Algorithm to sort itself and the way of indexing them is through left to right nodes in every level. You can access a parent of the node by dividing their index by 2. Types of Heap A. Max Heap In Max Heap Binary Tree, The parent of the node child holds a value that is greater than its child value. The Max Value of the Tree is located at the Root of the tree. B. Min Heap In Max Heap Binary Tree, The parent of the node child holds a value that is smaller than its child value. The Min Value of the Tree is located at the Root of the tree. Min Max Heap C. Min Max Heap Min Max Heap is a special case of Heap. It lets you build a tree structure that has an alternating structure where odd heights of the tree prioritize minimum value while the even heights prioritize m