pallav12's blog

By pallav12, 3 years ago, In English

Problem B of previous Div 2 (711), 2 almost same code gives different verdicts, TreeSet gives TLE, while Mutatable List got Accepted.

  1. Using TreeSet: TreeSet using frequency array gives TLE, even though treeset has Log(n) removal time.

  2. Using MutableList: Gets AC even with linear removal time.

I'm not sure what am I missing.

  • Vote: I like it
  • 0
  • Vote: I do not like it