Skip to content
Sharp

Core Collections · interview question

What is the clearest sign that code around dicts should be refactored?

Multiple choiceEasychapter-3-curatedpremiumcore-collectionsdicts
Choose one answer
Answer and explanation

Correct answer

B. When the rule is no longer easy to trace, explain, or change without breaking nearby behavior.

Why

A refactor is justified when the code stops communicating its intent. Use dictionaries when the code benefits from named fields or key-based access that reads like the domain.

Test yourself on Core Collections

A free test with instant, explained results. No account needed.

Start free test
All Core Collections questions →