Siv Scripts

Solving Problems Using Code



Sat 09 September 2017

Visualizing Stacks

Posted by Aly Sivji in Quick Hits   

A stack is a linear data structure that holds a collection of items. We can define operations performed in a stack from the point of view of a user:

  • .push() - add item to top
  • .pop() - remove and return item from top
  • .peek() - return top most element
  • .is_empty() - True if stack …

Read more...