top of page

PROGRAMMING CHALLENGES

Browser Back Button

Difficulty:

2 Medium

2.3 Stacks

Topic:

Simulate a browser's back button using a stack. As the user visits new pages, add them to the stack. The user can then "go back" to the previous page by popping the stack. Implement this in pseudocode or Python.

Use a stack to store the URLs of visited pages. When the back button is clicked, pop the stack to go to the previous page.

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