Concepts5
βοΈAlgorithmIntermediate
Problem Classification Patterns
Many competitive programming problems map to a small set of classic patterns; recognizing keywords and constraints lets you pick the right tool fast.
#problem classification#binary search on answer#two pointers+12
βοΈAlgorithmIntermediate
Dijkstra's Algorithm
Dijkstra's algorithm finds shortest path distances from one source to all vertices when all edge weights are non-negative.
#dijkstra#shortest path#greedy+11
βοΈAlgorithmIntermediate
Dijkstra - Variations and Applications
Dijkstraβs algorithm can be adapted to track the second shortest path by keeping the best and second-best distances per vertex.
#dijkstra#second shortest path#k shortest paths+12
βοΈAlgorithmIntermediate
Greedy Algorithms
Greedy algorithms build a solution step by step by always taking the best local choice available.
#greedy algorithms#activity selection#interval scheduling+12
ποΈData StructureIntermediate
Priority Queue (Heap)
A priority queue returns the highest-priority element first and is efficiently implemented by a binary heap.
#priority queue#binary heap#min-heap+11