Starting from:

$30

NCO-Project 3 MIPS Assembly 3 Solved

Binary search is an efficient search algorithm to locate the position of a specific value (key) within a sorted array. In each step, the algorithm compares the input key value with the value of the middle array element. On a key match, the matching element has been found and its index/position is returned. Otherwise, if the input key is less than the middle element, then the algorithm repeats itself on the sub-array to the left. If the input key is greater, the algorithm repeats itself on the sub-array to the right. If the remaining array size to be searched is reduced to zero, then the key cannot be found in the array and a special "Not found" indication is returned. The algorithm complexity is 𝑂𝑂(log𝑁𝑁). In this project, you are required to implement a binary search algorithm for a sorted input array A. The array contains at most 100 integer elements separated by commas. All values are between -100 and 100.

 

More products