It seems to be a popular opinion that "the right way" to implement undo/redo is "using a stack." (particularly in the context of an algorithms and data structures interview.)
Here's a GeeksForGeeks article as one reference on this view.
A common variation on this problem is "suppose we want to be able to do many undo or redo operations in a row." (I would argue this feature could be implied in the original question, but it seems that is not the popular view.)
I asked a group about how to solve this and the overwhelming answer from those with a traditional CS background was "use two stacks."
My question here is: Is there any benefit two using two stacks over using an array with a pointer?
It seems to me two stacks is isomorphic to an array with two pointers, but we really only need one pointer so that would be a more efficient approach.