Searching & Numerical Methods
Binary search on arrays and on answers, ternary search and iterative root finding.
5 articles~32 min total
0/5
Search
- Binary SearchHalve the search space at every step: sorted arrays, any monotone predicate, searching on the answer, real numbers and galloping.9 minIntermediate
- Ternary SearchFind the maximum or minimum of a unimodal function by discarding a third of the interval each step.6 minIntermediate
- Newton's Method for Finding RootsFind a root of f(x) = 0 by repeatedly replacing the function with its tangent line: quadratic convergence, the square-root special case, and when it fails.6 minIntermediate
- Simulated AnnealingA randomized local search that sometimes accepts worse solutions, with a decreasing temperature, to escape local optima; applied to the travelling salesman problem.6 minAdvanced