Groups
Category
Integer overflow happens when a computed value exceeds the range of its type; in C++ this silently wraps for unsigned and is undefined for signed, so prevention is crucial.
Matrix exponentiation turns repeated linear transitions into a single fast power of a matrix using exponentiation by squaring.