Practice free →
HomeAP Computer Science AComputer ScienceData Structures and Algorithms › Instead of narrowing down a sorted list by compa…

Instead of narrowing down a sorted list by comparisons, hashing can index an element directly in:

AQuadratic time
BFactorial time
CLinear time
DConstant time
Answer & Solution
Correct answer: D. Constant time
1. No comparisons are needed. 2. The hash goes straight to the slot. 3. It is constant time. _Source: OpenStax Introduction to Computer Science, Chapter 3, Data Structures and Algorithms._
Solve this in the app — AP Computer Science A practice & 24k+ MCQs →
Related questions