Frequency Queries

  • + 0 comments

    This is what helped me.

    Ended up having to add some extra operations to op 1 and 2 to maintain a second map of frequencies. But op 3 is now O(1), which was the bottleneck.