B – Tree – Theory

B-Tree is a self-balancing search tree. In most of the other self-balancing search trees (like AVL and Red Black Trees), it is assumed that everything is in main memory. To understand use of B-Trees, we must think of huge amount of data that cannot fit in main memory. When the number of keys is high, the data is… Continue reading B – Tree – Theory


Priority Queue – Theory

Java Docs In computer science, a priority queue is an abstract data type which is like a regular queue or stack data structure, but where additionally each element has a "priority" associated with it. In a priority queue, an element with high priority is served before an element with low priority. If two elements have the same priority, they are served according to their… Continue reading Priority Queue – Theory


Min Heap Visualizer  Max Heap Visualizer Heap Basics Question List Heap is an almost complete binary tree. Time complexity of building a heap = O(n) (and not O(n(logn))) - SO N – 1 internal nodes in a binary tree with N leaf (external) nodes GFG It would be O(n log n) if you built the heap by repeatedly… Continue reading Heap