We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6570e93 commit 8268e77Copy full SHA for 8268e77
Binary_search.py
@@ -25,7 +25,7 @@ def binarySearch(arr, l, r, x):
25
if __name__ == "__main__":
26
# User input array
27
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
+ 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
29
#map function returns a list of results after applying the given function to each item
30
x = int(input("Enter the element you want to search in given array"))
31
0 commit comments