Stack Bash - Master data structures and algorithms

Implement a Stack using a Linked List

Implement a stack using a singly Linked List.
Your Stack class should implement the following methods:
  • push - adds data to the stack
  • pop - Pops the last data out of the stack
  • peek - Returns the data at the top of the stack (keeps that data in the stack)

Try it first


5 Essential Stacks & Queues Coding Interview Problems

Master Stacks & Queues by trying the coding challenges below.
  1. 1.Implement StackEasy
  2. 2.Implement QueueEasy
  3. 3.Max StackMedium
  4. 4.Valid ParenthesesMedium
  5. 5.Simplify PathMedium

Want to confidently pass your next coding interview?

Stack Bash helps new and veteran software engineers master data structures and algorithms for technical interviews.