Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

DeadlyRubber's blog

By DeadlyRubber, history, 5 weeks ago, In English,

Could anyone please tell is there any alternative for pbds in java. I searched in the net but could find nothing. So is it that java users implement BIT or segment tree when c++ users use pbds or do they have some shortcuts ?

 
 
 
 
  • Vote: I like it
  • -3
  • Vote: I do not like it

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

anyone?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you be a little more specific with your question.

»
3 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

If you're looking or an equivalent to the pbds ordered set/map, TreeSet and TreeMap might offer what you're looking for. You can simulate find_by_order with toArray and order_of_key by getting the size of the headMap. I don't know what sort of efficiency these would come with though, you would have to benchmark them.

»
3 weeks ago, # |
  Vote: I like it +9 Vote: I do not like it

I see the community is so much toxic that users are forced to ask genuine questions using new account. It makes me sad.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Sometimes, its also for the reason that you don't want your friends to see you posting silly things :P