Skip to content

Minor fix #753

Merged
geekcomputers merged 2 commits intogeekcomputers:masterfrom
Monsieurvishal:master
Jun 27, 2020
Merged

Minor fix #753
geekcomputers merged 2 commits intogeekcomputers:masterfrom
Monsieurvishal:master

Conversation

@Monsieurvishal
Copy link
Contributor

No description provided.

TypeError                                 Traceback (most recent call last)
<ipython-input-7-6e7ff2ec5466> in <module>
     27 
     28     # Function call
---> 29     result = binarySearch(arr, 0, len(arr) - 1, x)
     30 
     31     #printing the output

<ipython-input-7-6e7ff2ec5466> in binarySearch(arr, l, r, x)
      4         mid = l + (r - l) / 2;
      5 
----> 6         if arr[mid] == x:
      7             return mid
      8 

TypeError: list indices must be integers or slices, not float
@geekcomputers geekcomputers merged commit e42da04 into geekcomputers:master Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants