Sunday C++ interview problem.
Implement an O(1) ranking data structure with the following operations:
Increment/decrement key's value, incrementing a non-existent key should add it with value 1; decrementing a key with value 1 should remove it.
Min/Max operations that should return the min/max key.
Solve it yourself: https://compiler-explorer.com/z/vaPsGsxze
Solution: https://compiler-explorer.com/z/eGGdnb55r