Deque, Priority Queue
Deque
Deque is an abbreviation for Double-Ended Queue, which, as the name suggests, is a generalized form of a queue ADT that allows extraction from both ends.
A deque can handle both insertion and deletion from both ends and possesses the characteristics of both stacks and queues. Specifically, it's best implemented using a doubly linked list.
641. Design Circular DequePriority Queue
A priority queue is similar to Abstract Data Types like queues or stacks, but additionally associates each element with a "priority."
Priority queues are utilized in various fields, including algorithms like Dijkstra's shortest path search. They are also closely related to the "heap" data structure.
23. Merge k Sorted Lists 🔥Last updated