c++

Convenient and near-optimal binary search on floating point numbers

A near-optimal floating-point binary search template that searches representable values via bit-casts instead of hard-coded iteration counts.

Write recursive DP without thinking about memoization

A C++ template for recursive DP with automatic memoization, built from recursive lambdas, generalized hashing, and policy-based hash tables.

On lambdas, C++ and otherwise: the what, the why, and the how

A tutorial on lambdas, from lambda-calculus context and C++ closure mechanics to recursion, stateful patterns, STL use, and competitive-programming examples.

Avoiding temporaries - generalizing i++ using std::exchange

A discussion and generalization of post-increment through std::exchange, with examples in recurrences, GCD code, lazy updates, moves, locks, and iterators.

The Boost C++ library in competitive programming

The Boost C++ library and examples of what it would give competitive programmers beyond the standard library.

Writing C++ like Python: tricks Python doesn't want you to know

A collection of modern C++ tricks that make code succinct and clean, from negative indexing and ranges to lambdas and compact utilities.