Overview

  • Last in, first out (LIFO)
  • Basic operations: Pop, Push, Peek
  • Can be implemented with a linked nodes or an array.

 

Stack

 

Advantages

  • ¬†Closely models some real world problems

 

Disadvantages

  • ¬†Limited uses and functions.

 

Time Complexities

 

Common Operations

Push

Pop

Peek

Leave a Reply

Your email address will not be published. Required fields are marked *