Solutions may require mathematical proofs, tracing of algorithms (displaying the calculations and values of variables for each iteration of the algorithm), algorithm design, and writing programs.
The following submission rules apply:
· For those questions requiring programs, the solutions must be implemented using JavaScript or Java.
o Appropriate self-documenting comments in the source code are mandatory, consistent with good programming practices.
o Solutions must be provided in plain text so that formatting is not lost.
· All answers must be provided in this document.
· Sources must be given accurate and complete citations sufficient for the instructor to find and confirm them.
1 Design an algorithm that tests whether or not two input lists of size n have at least one element in common.
2 Implement BinarySearch in JavaScript or Java and provide an execution trace including a listing of the values of Low, High, and Mid after each iteration, for the list:
(2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37)
using the following search elements X:
a. X = 3
b. X = 24