Overview

  • Typically fixed size

Advantages

  •  Constant index times

Disadvantages

  • Slow searching
  • Fixed size.  Changes in size are often costly in space and time.

Time Complexities

OperationsAverage CaseWorst Case
IndexingO(1)O(1)
SearchingO(n)O(n)
InsertingN/AN/A

Multidemensional Arrays

Tip – avoid using x and y as variable names. Instead use row and column.

Fixed length or symmetrical

Jagged

Leave a Reply

Your email address will not be published. Required fields are marked *