Question: 0 . 2 Binary search Linear search may require searching all list elements, which can lead to long runtimes. For example, searching for a contact
Binary search
Linear search may require searching all list elements, which can lead to long runtimes. For example, searching for a contact on a smartphone onebyone from first to last can be time consuming. Because a contact list is sorted, a faster search, known as binary search, checks the middle contact first. If the desired contact comes alphabetically before the middle contact, binary search will then search the first half and otherwise the last half. Each step reduces the contacts that need to be searched by half.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
