top of page

PROGRAMMING CHALLENGES

Reverse a String

Difficulty:

2 Medium

2.3 Stacks

Topic:

Write a program to reverse a string using a stack. The user should input a string, and the program should output the string in reverse order. Implement this in pseudocode or Python.

Push each character of the string onto the stack, then pop them off to reverse the string.

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