Implemented a data structure that allows:
- find the sum on the subsegment [l,r]
- insert element x at position pos
- remove the element x located at position i
- to assign the element x on the subsegment [l, r]
- add the number x on the subsegment [l, r]
- next_permutation on the subsegment [l, r]
- prev_permutation on the [l, r] subsegment.
All operations work for O(logn) This structure works on Splay-tree with