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 54 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
Excellent


flexer1n1

  • Member
  • Posts: 373
Reply 3 on: Yesterday
Gracias!

 

Did you know?

The average office desk has 400 times more bacteria on it than a toilet.

Did you know?

People with alcoholism are at a much greater risk of malnutrition than are other people and usually exhibit low levels of most vitamins (especially folic acid). This is because alcohol often takes the place of 50% of their daily intake of calories, with little nutritional value contained in it.

Did you know?

No drugs are available to relieve parathyroid disease. Parathyroid disease is caused by a parathyroid tumor, and it needs to be removed by surgery.

Did you know?

Dogs have been used in studies to detect various cancers in human subjects. They have been trained to sniff breath samples from humans that were collected by having them breathe into special tubes. These people included 55 lung cancer patients, 31 breast cancer patients, and 83 cancer-free patients. The dogs detected 54 of the 55 lung cancer patients as having cancer, detected 28 of the 31 breast cancer patients, and gave only three false-positive results (detecting cancer in people who didn't have it).

Did you know?

Before a vaccine is licensed in the USA, the Food and Drug Administration (FDA) reviews it for safety and effectiveness. The CDC then reviews all studies again, as well as the American Academy of Pediatrics and the American Academy of Family Physicians. Every lot of vaccine is tested before administration to the public, and the FDA regularly inspects vaccine manufacturers' facilities.

For a complete list of videos, visit our video library