Q: Write a Scheme program using Dr. Racket to perform a binary search. Sample Data Pattern: (define alist ‘ XXXXXXXXXX XXXXXXXXXX)) Test -2, 9, 16, 37 Sample Output : > (binary alist -2) -1 > (binary...


Q:


Write a Scheme program using Dr. Racket to perform a binary search.


Sample Data Pattern:


(define alist ‘(1 3 7 9 12 18 20 23 25 37 46))


Test -2, 9, 16, 37



Sample Output :


> (binary alist -2)


-1


> (binary alist 9)


3


> (binary alist 16)


-1


> (binary alist 37)


9



Jun 01, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here