Arrays are one of the earliest data structures. They are essentially just a block of memory which is accessed by offset. Despite their simplicity there are still several broad categories each with their own sets of algorithms.
Is the array a fixed size or can it grow as you add elements to it?
A fixed size array is called a static array and one that can grow is called a dynamic array.
Are the element all of the same type or can they be different?
If they must all be the same type then the array are called homogeneous. Otherwise it is a heterogeneous array.
Finally, how many dimensions (subscripts) does the array have?
For example, a 2 dimensioned array is a matrix.
The number of dimensions doesn't change the structure of the array but changes the way elements are accessed.
So far you have not embarrassed yourself or the house you serve. Continue.
ReplyDeleteOh no! Now there is pressure!
ReplyDelete