C programming is the language
D. Binary Search(3152) Description Given an ordered sequence, you are required to do binary searching on it for some numbers. If found, print out this number, YES and comparison times. if not found, print out this number, NO and comparison times. Please refer to output samples. The data set maybe is as big as 10000. Input The first line enters several positive number(in ascending order), ended with -1. The second line enters several search numbers ended with -1. Output Print out the results in several lines. if the number is found, print out this number and its position based on 0, starting from ) if the number is not found, first print out the numbe and Not Found. There is space between the number, Not and Found words. Pls refer the output sample.
input 3 5 6 8 10 12 - 1 6 6 1 13 10 -1 output 162 1 Not Found 13 Not Found 10 4
D. Binary Search(3152) Description Given an ordered sequence, you are required to do binary searching on it for some num
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
D. Binary Search(3152) Description Given an ordered sequence, you are required to do binary searching on it for some num
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!