Colors: Orange = Current Element, Green = Found/Success, Blue = New Element, Red = Deleted
Array is a linear data structure that stores elements of the same data type in contiguous memory locations.
Key Characteristics:
Why use Arrays?
Common Applications:
Operation | Time Complexity | Space Complexity |
---|---|---|
Access | O(1) | O(1) |
Search | O(n) | O(1) |
Insertion | O(n) | O(1) |
Deletion | O(n) | O(1) |
Traversal | O(n) | O(1) |
Strengths:
Limitations: