Skip to content

Glossary: Coding Interviews in C++

INF

Also written: infinity, std::numeric_limits<int>::max()

A big constant, such as 1,000,000,000, used in dynamic programming as "worse than any real answer". It is kept smaller than the int maximum so adding 1 does not overflow.

Where the book teaches it

Related terms

Integer overflowDynamic programming (DP)