CA|Implement a Stack[Lv.1 Beginner]Stacks & Queues
00:00
Implement a Stack
Implement a stack data structure with push, pop, peek, and isEmpty methods. push(val) adds to top, pop() removes and returns top (return null if empty), peek() returns top without removing (return null if empty), isEmpty() returns boolean.