What type of search does the following function implement?bool aSearch (int list[ ], int last, int target, int* locn ){ int begin, mid, end; begin = 0; end = last; while (begin <= end) { mid = ( begin + end ) / 2; if ( target > list[ mid ] ) begin = mid + 1; else if ( target < list[ mid ] ) end = mid - 1; else begin = end + 1; } *locn = mid; return (target == list [mid]);}
A. sequential search
B. probability search
C. ordered list search
D. binary search
Answer: D
Computer Science & Information Technology
You might also like to view...
Windows PC and Apple Mac are types of ________
A) platforms B) operating systems C) hardware D) software
Computer Science & Information Technology
On a Windows NT/2000/XP/2003/Vista/2008 computer, the ____ program provides the FTP service.
A. Microsoft Internet Interface Services B. Microsoft Information Services C. Microsoft Internet Provider Services D. Microsoft Internet Information Services
Computer Science & Information Technology
3G, 4G, and LTE are all terms that refer to mobile Internet connectivity.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology
Once a field has been added to a form, you cannot change the text for the field's label.
a. true b. false
Computer Science & Information Technology