Priority Queue
A priority queue is like a heap. By default, it’s a max-heap (the largest element is always at the top).Min-Heap
To make it a min-heap:Deque (Double-Ended Queue)
A deque allows insertion and deletion from both ends in .Lower Bound and Upper Bound
Very useful for binary search on sorted containers.lower_bound: Returns an iterator to the first element value.upper_bound: Returns an iterator to the first element value.
Custom Sorting with STL
You can usestd::sort with custom comparators or use std::greater<T>().
Practice
Sheet 6: STLs 2
Practice problems for this tutorial.