Skip to content

Latest commit

 

History

History
 
 

stack

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Stack

A generic LIFO stack backed by an array.

  • push, pop, peek, isEmpty, size
  • pop and peek throw when the stack is empty
  • All operations are O(1) amortized

Run tests: npx vitest src/dsa/structures/stack