Download the file. The first line contains a sorted array of numbers. In this array, you need to find the nearest number for each number from the second row. If two numbers are equidistant from the one you're analyzing, select the left value. As an outcome, specify these nearest values.
Binary search
Approximate search
Report a typo
Sample Input 1:
11 22 33 35 41 47 51 56 67 73 76 77 84 85 91
83 94 66 78 51 22 94 73 60 26 17 48 51 1 84Sample Output 1:
84 91 67 77 51 22 91 73 56 22 22 47 51 11 84Write code in your IDE to process the text file and display the results below
Time limit: 5 minutes
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.