You are viewing a single comment's thread. Return to all 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.
Seems like cookies are disabled on this browser, please enable them to open this website
Frequency Queries
You are viewing a single comment's thread. Return to all 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.