Post

💡 A heap is a tree-based data structure that’s great for priority queues. Think of it as a stack of tasks where insertions and deletions stay efficient: O(log n). In a min-heap, the smallest element is always on top. In a max-heap, the largest is on top. #programming #datastructures

0 reposts1 like

No replies yet.