Key Concepts

Review core concepts you need to learn to master this subject

Stack overflow

Every stack has a size that determines how many nodes it can accommodate. Attempting to push a node in a full stack will result in a stack overflow. The program may crash due to a stack overflow.

A stack is illustrated in the given image. stackA.push(xg) will result in a stack overflow since the stack is already full.

Stacks: Conceptual
Lesson 1 of 2
  1. 1
    A stack is a data structure which contains an ordered set of data. Stacks provide three methods for interaction: - Push - adds data to the “top” of the stack - Pop - returns and removes data from…
  2. 2
    Stacks can be implemented using a linked list as the underlying data structure because it’s more efficient than a list or array. Depending on the implementation, the top of the stack is equivalen…
  3. 3
    Let’s take a minute to review what we’ve covered about stacks in this lesson. Stacks: - Contain data nodes - Support three main operations - Push adds data to the top of the stack - Pop remov…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo