Write your own stack class — push, pop, peek, isEmpty and size — without using the language's built-in stack.
Write your own stack class — push, pop, peek, isEmpty and size — without using the language's built-in stack.
Unlock the full question, the code runner with test cases, and reference solution
One-time unlock. Yours forever.
Or get a for every question, unlimited code runs and AI mock interviews.
Opens with the full question.