# Represented by a '(' for push, and ')' pop, a typical list of stack events might look like:
# Represented by a '(' for push, and ')' pop, a typical list of stack events might look like:
# (()(())((()((((()(((((
# (()(())((()((((()(((((
# This can be broken up to the following:
# Processing from end to start (right to left), when encountering a "pop", it is guaranteed there's a corresponding push somewhere, so we can break up the list like this:
# a string of pushes at the start of the list, that do may not yet have a corresponding "pop" + a push/pop pair enclosing other push/pop pairs or string of pushes + another, optional, string of pushes at the end of the list
# Processing from end to start (right to left), when encountering a "pop", it is guaranteed there's a push somewhere, so we can break up the list like this: