Skip to content

Glossary: Coding Interviews

float("inf")

Also written: infinity, inf

Python's infinity, a number bigger than any other. In DP it stands for "worse than any real answer" or "can't be done", so the first real answer always beats it.

Where the book teaches it

Related terms

Dynamic programming (DP)