Concepts80

Category

Level

Filtering by:
#competitive programming
⚙️AlgorithmIntermediate

0-1 BFS

0-1 BFS is a shortest path algorithm specialized for graphs whose edge weights are only 0 or 1.

#0-1 bfs#binary weights#shortest path+12
⚙️AlgorithmIntermediate

Depth-First Search (DFS)

Depth-First Search (DFS) explores a graph by going as deep as possible along each path before backtracking.

#depth-first search#dfs#graph traversal+12
⚙️AlgorithmIntermediate

2D Prefix Sum

A 2D prefix sum (also called an integral image) lets you compute the sum of any axis-aligned sub-rectangle in constant time after O(nm) preprocessing.

#2d prefix sum#summed-area table#integral image+12
⚙️AlgorithmIntermediate

Prefix Sum and Difference Array

Prefix sums precompute running totals so any range sum [l, r] can be answered in O(1) time as prefix[r] - prefix[l-1].

#prefix sum#difference array#imos method+12
⚙️AlgorithmIntermediate

Sorting Algorithms

Sorting arranges items into a chosen order so that searching, grouping, and further algorithms become faster and simpler.

#sorting algorithms#merge sort#quicksort+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
⚙️AlgorithmIntermediate

Ternary Search

Ternary search finds the maximum or minimum of a unimodal function on a line by probing two interior points and discarding one third of the interval each step.

#ternary search#unimodal function#convex optimization+12
⚙️AlgorithmIntermediate

Binary Search

Binary search quickly finds targets or boundaries in sorted or monotonic data by halving the search interval each step.

#binary search#lower_bound#upper_bound+11