Refactor snapshot state to insert/remove spies to/from end of list instead of begining of list. This improves the efficiency of insertion and removal of a spy to be O(1) instead of O(n). Hence, reverting a
snapshot now becomes O(n) instead of O(n^2).
Refactor snapshot state to insert/remove spies to/from end of list instead of begining of list. This improves the efficiency of insertion and removal of a spy to be O(1) instead of O(n). Hence, reverting a snapshot now becomes O(n) instead of O(n^2).