yash13203's blog

By yash13203, history, 2 years ago, In English

is there any alternative that I can use in java for ordered_Set I have came across a problem https://codeforces.com/contest/1676/problem/H2 and most of the people out there have solved it using ordered_set but how can I implement it in java or is there any better way or alternative that I can use in place of ordered_set

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

| Write comment?
»
2 years ago, # |
  Vote: I like it +4 Vote: I do not like it
  1. Fenwick Tree + compression if necessary.
  2. This problem is well known and can be also solved with mergesort (but in general this is not applicable)