On this page
article
Interview Q&A #136
System Design interview question #6.
Category: System Design
Question
[System Design] Question #6: What is the difference between a list and a tuple?
Answer
Lists are mutable, tuples are immutable. Tuples can be dict keys and are faster for fixed data.
Expand your answer with examples from your projects and link to Interview Prep.
Follow-Up Questions
- Can you explain a trade-off involved?
- How would you test this in production?
- What could go wrong at scale?