Fundamentals
/
Implementing Stack with Array
⏸
00:00
↻
← Prev
Next →
▶
Question
Implement a Stack class backed by an array supporting push(value), pop(), peek(), and size(). Pop and peek return null when empty.
▶
My Code
▶
Reference Solution