Maybe rename this to `visitedOperations`, helps understand the algorithm better.