• Julian's Globe

    ARRAY

    Let us begin with defining this data structure. An array may be defined as a container of data where the data values are assigned to different slots which are indexed from 0 to its size minus 1, where size denotes the number of data values it contains. Normally, you would begin counting from 1 and continue forward, but the indexing of arrays starts counting from 0 and for this reason it is indexed from 0 to its size minus 1. Also, arrays are not dynamic containers. What this means is that once the size of the array is chosen, it must permanently remain of that size.

    An example to help visualize arrays involves cubbies. In kindergarten or preschool, each student may be assigned a number where they may place their school items in for the duration of the school day. Say there are 10 students in the classroom, and the cubbies are labeled 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The image below depicts this visualization: