Multiple ChoiceIntermediate 30s
List vs Set Lookup
Choose the best answer for: lookup performance
Options
- 1List lookup is faster than set lookup in every case
- 2They have exactly the same average performance
- 3Set lookup is O(n) while list lookup is O(1)
- 4Set membership (in) is O(1) average; list is O(n)
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.