Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 358 Bytes

File metadata and controls

10 lines (7 loc) · 358 Bytes

search compare

compare between random and binary search (guess number game)

first algorithm picks a random number between two numbers. second one picks the middle between two numbers in a while loop. third one picks the middle between two numbers with recursion.

binary search will always have a better average score, but recursion (3) needs more time.