Skip to content
Permalink
Browse files
Tested Binary Search
  • Loading branch information
hortonr6 committed Jul 22, 2019
1 parent 58a188d commit bf30e99db62f4a4a555544681c9f08c05026fdad
Showing 1 changed file with 8 additions and 0 deletions.
@@ -35,6 +35,7 @@ def binarySearch(target, data):


inputData = [43, 67, 12, 34, 76, 4, 19, 7, 200, 38]
sortedData = [1, 5, 7, 34, 41, 49, 67, 89, 102, 432]

#Linear Search Test
#Standard
@@ -47,3 +48,10 @@ print("-------")
print(linearSearchBool(38, inputData))
print(linearSearchBool(12, inputData))
print(linearSearchBool(8, inputData))

print("-------")

#Binary Search Test
print(binarySearch(1, sortedData))
print(binarySearch(89, sortedData))
print(binarySearch(42, sortedData))

0 comments on commit bf30e99

Please sign in to comment.