Priority Queue
Everything on SkillVeris tagged Priority Queue — collected across the glossary, study notes, blog, and cheat sheets.
12 resources across 1 library
Interview Questions(12)
What is a Heap?
A heap is a complete binary tree stored in an array that satisfies the heap property — in a min-heap every parent is smaller than or equal to its children, giv…
What is a Priority Queue?
A priority queue is an abstract data type where each element has a priority, and the element with the highest (or lowest) priority is always removed first, typ…
What is Dijkstra’s Algorithm?
Dijkstra’s algorithm finds the shortest path from a single source vertex to every other vertex in a weighted graph with non-negative edge weights, using a gree…
What is Heap Sort?
Heap sort builds a max-heap from the input array, then repeatedly swaps the root (the current maximum) with the last unsorted element and sifts the reduced hea…
What is Prim's Algorithm?
Prim's algorithm builds a minimum spanning tree by growing a single connected tree from an arbitrary start vertex, at each step adding the cheapest edge that c…
What is a Min-Heap?
A min-heap is a complete binary tree, usually stored as an array, where every parent node is less than or equal to its children, guaranteeing the smallest elem…
What is a Max-Heap?
A max-heap is a complete binary tree, usually stored as an array, where every parent node is greater than or equal to its children, guaranteeing the largest el…
How Do You Merge K Sorted Linked Lists?
K sorted linked lists are merged efficiently in O(N log k) time by using a min-heap of size k that always holds the current head of each list, repeatedly poppi…
What is the Single-Source Shortest Path Problem?
Single-source shortest path (SSSP) finds the minimum-cost route from one fixed source vertex to every other reachable vertex in a graph, solved with BFS for un…
How Do You Solve the Meeting Rooms Problem?
The meeting rooms problem asks for the minimum number of rooms needed to host a set of meetings, and it is solved by separating start and end times into two so…
What is the Huffman Coding Algorithm?
Huffman coding is a greedy algorithm that builds an optimal prefix-free binary code by repeatedly merging the two least-frequent symbols into a new tree node,…
How to Design a Web Crawler
A web crawler is designed as a distributed pipeline of a URL frontier, fetchers, parsers, and a dedup/storage layer, where politeness rules, priority schedulin…