This can be done with simply an array of size N, where each element consists of 2 numbers - the current value, and a version (say a timestamp, for example). And you also need a global last reset (zero'd) version and a global max value.
To increment:
- If that element's version is less than the global, simply set it's value to 1. Otherwise increment it.
- If it's greater than the global max, set the global max to its value.
- Set its version appropriately (to the current time).
To get the maximum:
- Simply return the global max.
To reset:
- Simply set the global last reset version (to the current time) and also set the global max value to 0.
All operations: O(1).