The correct answer is stack.
Stacks use a Last In, First Out (LIFO) principle which makes it easy to reverse elements, as you can simply pop elements off the stack in the reverse order they were added.
1 answer
The correct answer is stack.
Stacks use a Last In, First Out (LIFO) principle which makes it easy to reverse elements, as you can simply pop elements off the stack in the reverse order they were added.