Queries on set/multiset

Revision en1, by kushagra1998, 2019-09-14 20:38:54

What is the best way to perform queries on set such that each query would be either of type : 1. Add an element to a set. 2. Increase all elements of the set by some constant. 3. Print the K'th largest element from the set.

Any tutorials would be helpful.

Also if there is another query(including the above 3) remove an element from set, then what can be the best solution?

Tags set, multiset, segment tree, merge sort tree

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English kushagra1998 2019-09-14 20:38:54 407 Initial revision (published)