Segment Tree | Help Needed

Revision en1, by redcoder23, 2020-08-26 11:20:10

An array is given (indexing starts with 1) of size S and N number of queries is given by user Ni=(M P R); 1<=i<=N. Print the Rth minimum element from the array after updating Mth index. Example :- Array : [2, 4, 6, 1, 7] S=5

Queries : N=3

2 5 3

5 3 2

4 8 4

Output :- 5

2

6 How to solve this question.

Tags #segment tree, queries

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English redcoder23 2020-08-26 11:26:25 2 Tiny change: '\n2\n\n6\nHow to s' -> '\n2\n\n6\n\nHow to s'
en1 English redcoder23 2020-08-26 11:20:10 349 Initial revision (published)