In chapter 3, Binary Search and maintaining a sorted list code is not given on github
AnCyNitinChaudhary opened this issue · comments
Nitin Chaudhary commented
Please Update below given code:
import bisect
c=[1,2,2,2,3,4,7]
position=bisect.bisect(c,2)
position#this will give the position of last occurence of 2
position5=bisect.bisect(c,5)#if element is not present then this will return after which position the element must be present
position5
Output:
4
6
Wes McKinney commented
The bisect example has been removed from the 3rd edition, so closing this