I have a array of numbers. The size of the array is about 1e5. This count of operations is about 1e5.
There are 3 types of operation:
change the i-th (position) number;
query the k-th (big or small) number's value;
query the i-th (position) number's rank (big or small).
I have to implement BST myself?