subject

Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar. Observe the given code.

private static int[] u={2,7,9,11,21,26,35,44};
public static int binaryS(int key)
{

int first=0;
int last=u. length-1;
while(first<=last)
{
int middle=(first+last/2);
if (u[middle]==key)
return middle;
else if(u[middle] first=middle+1;
else
last=middle-1;
}
return -1;
}

What will be stored in x after executing the following statement?

int x= binaryS(2);

The output will be
.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
question
Computers and Technology, 24.06.2019 09:30
Atype of researcher who uses computers to make sense of complex digital data
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
These statements describe lists in presentation programs: a. bullets can be turned off and on. b. bullets cannot be turned off. c. bullet styles, colors, and sizes can be changed. d. lists don't have to use bullets or numbers. e. numbering styles, colors, and sizes can be changed. f. numbers can be turned off and on. g. numbers cannot be turned off. select all that apply
Answers: 2
question
Computers and Technology, 24.06.2019 16:30
The database design steps are listed below in the incorrect order. choose the correct order number next to each step. determine the information to be stored in the database. determine the fields needed to record the data determine if there will be any repetition of data entered, and separate the fields into tables to normalize the data. create relationships to connect the tables.
Answers: 3
You know the right answer?
Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fract...
Questions
Questions on the website: 13722361