Write a program that has array of at least 20 integers. It should call a function that uses the linear search algorithm to locate one of the values. The function should keep a count of the number of comparisons it makes until it finds the value. The program then should call a function the uses the binary search algorithm to locate the same value. It shoulf also keep count of the number of comparsions it makes. Display these on the screen.
Deena1977 0 Newbie Poster
Lucaci Andrew 140 Za s|n
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.