Multiple ChoiceBeginner 30s
Arrays: Insert in Middle
Inserting an element in the middle of an array requires shifting existing elements. What is the worst-case time complexity?
Options
- 1O(n²)
- 2O(n)
- 3O(1)
- 4O(log 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.