Time Complexity - Big O

Data structure and sorting algorithm time complexity.

1. Array

Access: O(1)

Insert: O(N)

Delete: O(N)

2. Linked List

Access: O(N)

Insert: O(1)

Delete: O(1)

3. Stack(First In Last Out)

Access: O(N)

Insert: O(1)

Delete: O(1)

4. Queue(First In First Out)

Access: O(N)

Insert: O(1)

Delete: O(1)

Time Complexity Compare

Data Structure Time Complexity

Array Sorting Algorithm Time Complexity