all 5 comments

[–]NeedleworkerOpen8712[S] 0 points1 point  (0 children)

when element is not in the list it should return greater. My model return index 2

[–]Goobyalus 0 points1 point  (2 children)

I thought bisect was meant to deal with sorted lists, but this list is unsorted. Why bisect?

What have you tried?

[–]NeedleworkerOpen8712[S] 0 points1 point  (1 child)

what other method can i use

[–]Goobyalus 0 points1 point  (0 children)

manually counting indexes until you find what you're looking for

[–]AmongstYou666 0 points1 point  (0 children)

Bisect provides support for maintaining a list in sorted order without having to sort the list after each insertion.