mediumMultiple ChoiceObjective-mapped
FC0-U71 Practice Question: Which data structure is best for storing a…
Which data structure is best for storing a collection of key-value pairs?
⚠ Common exam trap
Many exam-takers confuse a list or array with a dictionary because they think of 'indexing' as key-based, but lists/arrays only support integer indices, not arbitrary keys like strings or objects.
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 (also known as a hash map or associative array) is specifically designed to store key-value pairs, allowing efficient insertion, deletion, and lookup based on a unique key. In computing, this structure uses a hash function to compute an index into an array of buckets, enabling average O(1) time complexity for operations, which is ideal for scenarios like caching or configuration settings.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Queue
Why it's wrong here
Queues are for first-in-first-out processing.
- ✗
Array
Why it's wrong here
Arrays use numeric indices, not keys.
- ✓
Dictionary
Why this is correct
Dictionaries store key-value pairs.
- ✗
List
Why it's wrong here
Lists store ordered values without keys.
Go deeper
Related to this question
About these practice questions
One of 988 original FC0-U71 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.