Question: C++ youll need to make two functions, one which performs a linear search, and one which performs a binary search. These searches will be performed
C++
youll need to make two functions, one which performs a linear search, and one which performs a binary search. These searches will be performed on the following three arrays:
Array A: { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
Array B: {1, 2, 3, 5, 8, 13, 21, 34, 55, 89}
Array C: {20, 18, 16, 14, 12, 10, 8, 6, 4, 2}
FOR YOUR ASSIGNMENT: Search all three arrays following values using BOTH the linear and binary searches, report if theyre located or not, and indicate how many checks you did before you discovered your answer for each.
Value 1: Search for 5
Value 2: Search for 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
