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 56 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
Thanks for the timely response, appreciate it


ricroger

  • Member
  • Posts: 352
Reply 3 on: Yesterday
YES! Correct, THANKS for helping me on my review

 

Did you know?

For pediatric patients, intravenous fluids are the most commonly cited products involved in medication errors that are reported to the USP.

Did you know?

In the United States, an estimated 50 million unnecessary antibiotics are prescribed for viral respiratory infections.

Did you know?

About 60% of newborn infants in the United States are jaundiced; that is, they look yellow. Kernicterus is a form of brain damage caused by excessive jaundice. When babies begin to be affected by excessive jaundice and begin to have brain damage, they become excessively lethargic.

Did you know?

One way to reduce acid reflux is to lose two or three pounds. Most people lose weight in the belly area first when they increase exercise, meaning that heartburn can be reduced quickly by this method.

Did you know?

The Babylonians wrote numbers in a system that used 60 as the base value rather than the number 10. They did not have a symbol for "zero."

For a complete list of videos, visit our video library