I hereby claim:
- I am brantonb on github.
- I am brantonb (https://keybase.io/brantonb) on keybase.
- I have a public key ASBToWp0HNgXgloQ0zhclfA_O6eK5PwbMFSqdWc0b9Tfbgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
func binarySearch<T: Comparable>(item: T, values: [T]) -> Bool { | |
func search(start start: Int, end: Int) -> Bool { | |
// Base case #1: The range is empty. | |
guard start <= end else { | |
return false | |
} | |
// The index in the middle of the range [start, end]. | |
let mid = start + (end - start) / 2 |