...

/

Challenge: Implement Stack Data Structure

Challenge: Implement Stack Data Structure

This lesson brings you a challenge to solve.

Problem statement

Implement the stack data structure. It has cells to contain data. For example, integers 1, 2, 3, 4, and so on. The cells are indexed from the bottom (index 0) to the top (index n). Let’s assume n=3 for this exercise, so we have 4 places. A new stack contains 0 in ...

svg viewer