I have a problem were I need to answer two kinds of queries. The first query is to change the value of number at index i of the array to x. The second one is to find the number of elements lesser than x in (index) range [0, r]. Could you help me on this?
Thank you in advance.