Exercises - Cracking the Coding Interview

Chapter 3 - Stacks and Queues
  1. Problem 3.1 - Implement 3 stacks using one array
  2. Problem 3.2 - Find the minimum value in a stack in constant time
  3. Problem 3.3 - Implement a SetOfStacks object with the same operations as a Stack
  4. Problem 3.4 - Implement a MyQueue class using two stacks
  5. Problem 3.5 - Sort a stack from smallest to largest elements using only one temporary stack as a buffer
  6. Problem 3.6 - Implement an animal shelter adoption queue using LinkedList class


Problem 3.1 - Implement 3 stacks using one array

Back to Top


Problem 3.2 - Find the minimum value in a stack in constant time

Back to Top


Problem 3.3 - Implement a SetOfStacks object with the same operations as a Stack

Back to Top


Problem 3.4 - Implement a MyQueue class using two stacks

Back to Top


Problem 3.5 - Sort a stack from smallest to largest elements using only one temporary stack as a buffer

Back to Top


Problem 3.6 - Implement an animal shelter adoption queue using LinkedList class

Back to Top