subject

Can you search the following array using binary search?

int[] A = {6,5,4,2,0,1,-1,-17};

a. No. Binary search can be applied to a sorted array only.
b. Yes. Binary search can be applied to any array.
c. Yes, but the algorithm runs slower because the array is in descending order.
d. No, negative numbers are not allowed because they indicate that a value is not present.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:50
Which of the following had the greatest influence on opening the internet to the generly public
Answers: 1
question
Computers and Technology, 22.06.2019 16:10
Drag each label to the correct location on the imagelist the do’s and don’ts of safeguarding your password.keep yourself loggedin when you leave your computer.don’t write your password down and leave it whereothers can find it.share your password with your friends.each time you visit a website,retain the cookies on your computer.use a long password with mixed characters.
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
question
Computers and Technology, 23.06.2019 22:30
The output voltage of a power supply is assumed to be normally distributed. sixteen observations are taken at random on voltage are as follows: 10.35, 9.30, 10.00, 9.96, 11.65, 12.00, 11.25, 9.58, 11.54, 9.95, 10.28, 8.37, 10.44, 9.25, 9.38, and 10.85
Answers: 1
You know the right answer?
Can you search the following array using binary search?

int[] A = {6,5,4,2,0,1,-1,-17};<...
Questions
question
Mathematics, 27.09.2019 13:10
Questions on the website: 13722362