cheran-senthil / PyRival

⚡ Competitive Programming Library
https://pyrival.readthedocs.io/
Apache License 2.0
1.17k stars 312 forks source link

The new SortedList method naming scheme is not user friendly #75

Closed heidenrei closed 2 months ago

heidenrei commented 2 years ago

The old method names were better as they directly copied sortedcontainers. Using multiset method names is annoying.

bjorn-martinsson commented 2 years ago

Can you be more specific?

bogoconic1 commented 2 years ago

SortedList in python uses bisect_left (not lower_bound) and bisect_right (not upper_bound) and add method (not insert) lower_bound and upper_bound is the method names for C++ and many python users arent very good at it, which makes it very confusing

lower_bound -> bisect_left upper_bound -> bisect_right insert -> add

ensure consistency between the main SortedList implementation and this implementation

Mukundan314 commented 2 years ago

A remove method would be good as s.pop(s.lower_bound(val)) is not so obvious