Given two stacks, return true if their elements are equal or false if they're not.
Constraints:
- Recursion should not be used.
- Additional data structure should not be used.
- Both the stacks should be restored to their original state after the comparison.