Skip to content

Commit 8abdbcf

Browse files
Merge pull request #644 from sharma313/patch-1
Update Binary_search.py
2 parents 6570e93 + 8268e77 commit 8abdbcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Binary_search.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def binarySearch(arr, l, r, x):
2525
if __name__ == "__main__":
2626
# User input array
2727
print("Enter the array with comma separated in which element will be searched")
28-
arr = map(int, input().split(",")) #the input array will of int type with each element seperated with a comma due to the split fucntion
28+
arr =[int(x) for x in input().split(',')] #the input array will of int type with each element seperated with a comma due to the split fucntion
2929
#map function returns a list of results after applying the given function to each item
3030
x = int(input("Enter the element you want to search in given array"))
3131

0 commit comments

Comments
 (0)