Question: Which data structure is best suited for implementing a function that reverses a string?
Options:
Correct Answer: Stack
Solution:
A stack is best suited for reversing a string because it follows the Last In First Out (LIFO) principle, allowing the last character pushed to be the first one popped.