Implement A Queue Using Stacks

Table of Contents:

The Problem Introduction 0:00 - 0:17
The Queue ADT 0:17 - 1:27
What Problems Does A Stack Give Us? 1:27 - 1:45
Walkthrough With 1 Underlying Stack 1:45 - 6:44
We Missed Something...Go Back 6:44 - 7:39
Walkthrough Using A 2nd Stack 7:39 - 11:19
What You See Is A Queue (Abstraction) 11:19 - 11:52
Space Complexity 11:52 - 12:08
Time Complexity 12:08 - 12:20
Amortized Analysis: What Is It? 12:20 - 13:34
Amortized Analysis: Use For ArrayList<E> In Java 13:34 - 14:05
Wrap Up 14:05 - 14:40


Code: https://github.com/bephrem1/backtobackswe/blob/master/Stacks%20%26%20Queues/QueueWith2Stacks/QueueWith2Stacks.java
Leetcode Link: https://leetcode.com/problems/implement-queue-using-stacks/
Elements of Programming Interviews: 9.9

Discussion

0 comments