Given a string, write a function that reverses that string without using built-in functions or libraries.
Example:
Input: "hello" Output: "olleh"
Note:
Your algorithm should run in O(n) time and use O(n) extra space.
Walkthroughs of the solution. Try the steps first, then watch to compare approaches.
Free plan: 30 tutor messages. Premium is unlimited.
Saved
Ctrl + Enter to check