top of page

PROGRAMMING CHALLENGES

Undo Feature Simulation

Difficulty:

2 Medium

2.3 Stacks

Topic:

A text editor uses a stack to implement the "undo" feature. Write a program that allows the user to enter text and then undo the last action using a stack. Implement this in pseudocode or Python.

A stack follows Last-In-First-Out (LIFO) order. Push each action onto the stack and pop the top item to undo.

Need help with your programming skills?

If you need more help than just independent practise, then we're here for you. Book a 1:1 with us and we will be able to guide you to becoming a proficient programmer who can tackle any of the challenges an exam board can throw at you.

bottom of page