Computer Science Fundamentals Flashcards

1
Q

What is an array? What are the average time complexities for access, search, insertion and deletion?

A
• A one dimensional data structure consisting of elements, which can be references by their index.
Access: O(1)
Search: O(n)
Insertion: O(n)
Deletion: O(n)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly