Skip to content

Glossary: Data Structures and Algorithms in JavaScript

Amortized

Also written: amortized O(1)

A cost averaged over many operations. A push onto a JavaScript array occasionally has to move everything to a bigger block, but that is rare, so push is O(1) on average over many pushes.

Where the book teaches it

Related terms

Dynamic arrayBig-O notation