Concepts3
⚙️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
🗂️Data StructureIntermediate
Fenwick Tree - Range Update Range Query
A Fenwick Tree (Binary Indexed Tree) can support range additions and range sum queries by maintaining two trees, often called B1 and B2.
#fenwick tree#binary indexed tree#range add+12