FC0-U71 Software Development Concepts Practice Question
A developer is writing a program that stores a collection of unique student IDs. The program needs to quickly look up a student by ID and does not require the IDs to be stored in any particular order. Which data structure is most appropriate for this task?
⚠ Common exam trap
The trap is assuming that any collection can do fast lookup; candidates may pick array thinking index access is O(1), forgetting that student IDs are not contiguous array indices.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Dictionary
A dictionary (hash map) stores key-value pairs and provides average O(1) lookup by key, which is ideal for quickly retrieving a student record by unique ID. Since the IDs are unique and order does not matter, a dictionary's key uniqueness constraint and fast lookup make it the best fit. Arrays and other sequential structures would require O(n) search unless indexed by a contiguous integer range.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Dictionary
Why this is correct
A dictionary maps each unique student ID key directly to its value, giving average O(1) constant-time lookup by ID. It enforces key uniqueness automatically, satisfying the "unique student IDs" constraint, and imposes no ordering requirement, matching the stem's explicit statement that no particular order is needed.
- ✗
Queue
Why it's wrong here
A queue enforces first-in, first-out ordering, so finding a specific student ID means dequeuing or scanning entries sequentially rather than direct keyed lookup. It is tempting because queues preserve arrival order, and would be correct for job scheduling or message buffering, not unique ID retrieval.
- ✗
Array
Why it's wrong here
An array stores elements in contiguous indexed positions, so locating a student ID by its value requires linear searching unless the ID equals the index. It is tempting because arrays offer fast positional access, and would be correct when retrieval is by numeric index rather than by unique ID value.
- ✗
Stack
Why it's wrong here
A stack provides last-in, first-out access, so retrieving a student ID requires popping or scanning elements rather than direct lookup by key. It is tempting because stacks efficiently track recent operations, and would be correct for undo history or expression evaluation, not unique keyed retrieval.
Go deeper
Related to this question
About these practice questions
This FC0-U71 question is part of Courseiva's 988-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This FC0-U71 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the FC0-U71 exam.