Exercise: Test a Stack

Test a stack using nested tests.

Problem statement

A stack is a widely used data structure. It has different behaviors when it’s full or empty.

Write a test for a stack using nested tests.

Expected output

Get hands-on with 1200+ tech skills courses.