Ensure a class has only one instance, and provide a global point of access to it — every call to getInstance() must return the exact same object, so state persists across "modules" that each grab their own reference.
Implement Counter.getInstance() so it lazily creates the instance once and reuses it forever after, plus increment()/getValue() on that instance.
solve(ops) runs a sequence of 'increment' | 'getValue' operations against Counter.getInstance(), collecting the results of every 'getValue' call.
solve(['increment', 'increment', 'getValue']) → [2] — both increments landed on the same instance.
Sample tests