Problem B of previous Div 2 (711), 2 almost same code gives different verdicts, TreeSet gives TLE, while Mutatable List got Accepted.
Using TreeSet: TreeSet using frequency array gives TLE, even though treeset has Log(n) removal time.
Using MutableList: Gets AC even with linear removal time.
I'm not sure what am I missing.