Articles for author: Shreyas Waghmare

Difference Between Min Heap and Max Heap

A Heap is a special tree-based data structure where the tree is organized as a complete binary tree. Due to this structure, a heap with N nodes has a height of log N. It’s particularly valuable for efficiently removing the highest or lowest priority element. Typically represented as an array, there are two main types ...

Prim’s Algorithm

Prim’s Algorithm offers a strategic approach to constructing a minimum spanning tree from a given graph, ensuring every vertex is connected with the least total edge weight. This efficient method begins with a single vertex, expanding by selecting the lowest weight edges connecting to unvisited nodes, thus weaving a path that covers all without excess. ...