Hello, I recently remembered a problem statement that was something like this :
We have an array A of n integers and we need to answer the following type of queries. Q(l, r, p) means how many numbers from A[l..r] are less than p. The author mentioned that it can be done using a segment tree, but did not provide any further clarifications and I cannot wrap my head around it.
Any ideas/tips ?
Thanks in advance !
created
last reply
- 1
reply
- 638
views
- 2
users
- 1
link