Flashcards
How the core data structures work, the time complexity of their operations, and when to pick each one, for CS courses and coding interviews.
Array: access, search and insert costs
Tap to flip
Access by index O(1); search O(n) (O(log n) if sorted); insert or delete in the middle O(n) because elements shift.
Tap to see the front