Skip to content

Glossary: Coding Interviews

Lambda

Also written: lambda, key=

A short anonymous Python function, often passed as `key=` to tell `sorted` or `heapq` what to compare, such as `lambda pair: (-pair[1], pair[0])`.

Where the book teaches it

Related terms

heapqSort first