Homework 1


40 pts., due Feb. 21

  1. (10 pts.) Write, in C or C++, a version of the non-recursive binary search algorithm for integers. Then: This part will be turned-in in class. You should use a word processor or text editor for this.

  2. (30 pts.) Design a modular program to input at most 100 integers, sort them, and then query the user to search for (the user should be able to search for as many numbers as she desires). You may use any sort algorithm you like, but you should use recursive binary search for your search algorithm. Implement your program using Unix.

    This part will be turned in electronically on keystone by the beginning of class on Feb. 21. Instructions for doing this will be given to you later.

Thomas P. Kelliher
Thu Feb 8 14:17:14 EST 1996
Tom Kelliher