This topic contains a solution. Click here to go to the answer

Author Question: For a sorted list of 1024 elements, a binary search takes at most ________ comparisons. (Read 68 times)

maegan_martin

  • Hero Member
  • *****
  • Posts: 532

Question 1

What is the number of iterations in the following loop?

 int count = 5;
 while (count < n) {
count = count + 3;
 }

◦ n - 3
◦ n / 3 - 1
◦ (n - 5) / 3
◦ the ceiling of (n - 5) / 3
◦ n - 5

Question 2

For a sorted list of 1024 elements, a binary search takes at most ________ comparisons.
◦ 512
◦ 6
◦ 100
◦ 11


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by maegan_martin on May 6, 2020

ASDFGJLO

  • Sr. Member
  • ****
  • Posts: 335
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 49% of students answer this correctly




maegan_martin

  • Member
  • Posts: 532
Reply 2 on: May 6, 2020
YES! Correct, THANKS for helping me on my review


jojobee318

  • Member
  • Posts: 298
Reply 3 on: Yesterday
:D TYSM

 

Did you know?

If you use artificial sweeteners, such as cyclamates, your eyes may be more sensitive to light. Other factors that will make your eyes more sensitive to light include use of antibiotics, oral contraceptives, hypertension medications, diuretics, and antidiabetic medications.

Did you know?

The horizontal fraction bar was introduced by the Arabs.

Did you know?

Cocaine was isolated in 1860 and first used as a local anesthetic in 1884. Its first clinical use was by Sigmund Freud to wean a patient from morphine addiction. The fictional character Sherlock Holmes was supposed to be addicted to cocaine by injection.

Did you know?

There are approximately 3 million unintended pregnancies in the United States each year.

Did you know?

The shortest mature adult human of whom there is independent evidence was Gul Mohammed in India. In 1990, he was measured in New Delhi and stood 22.5 inches tall.

For a complete list of videos, visit our video library