Home › AP Computer Science Principles › Computer Science › Computing Foundations › An algorithm locates a number quickly inside a s…
An algorithm locates a number quickly inside a sorted array of integers. That algorithm is:
ABinary search
BLinear guessing
CBubble sorting
DRandom walking
Answer & Solution
Correct answer: A. Binary search
1. The array is already sorted.
2. The search narrows quickly.
3. It is binary search.
_Source: OpenStax Introduction to Computer Science, Chapter 1, Introduction to Computer Science._
Related questions
Businesses with a good reputation are said to need robust programmes protecting themselvesBy studying and applying algorithms, the field creates applications and solutions that reaOn large farms, machines now photograph plants as a tractor drives past, improving treatmeFrom a hardware view, computers rely on digital electronics and the physics of materials uWith Ada Lovelace's help, one nineteenth-century machine was program-controlled and had inA professor argues the subject is as much about people working with computers as about theComputers can process data and spot patterns, but they cannot fully grasp human emotions oCritics warn that when AI learns from big data, it can end up reproducing the data's exist