DSA-Lecture02 - ArraysII
DSA-Lecture02 - ArraysII
DSA-Lecture02 - ArraysII
and Algorithm
SE-202
Fall 2024
Task
Find the
logical
error
Find number of elements that must be
moved if Brown, John and peters are
inserted into array NAME
Task
Consider the 25 × 4 matrix array SCORE. Suppose
Base(SCORE) = 200 and there are w = 4 words per
memory cell. Furthermore, suppose the programming
language stores two-dimensional arrays using row-
major order. Then the address of SCORE[12, 3], the
third test of the twelfth student, follows:
Multidimensional Array
• Two dimensional Array
– used to store information that we normally represent in table form
– Two-dimensional arrays, like one-dimensional arrays, are
homogeneous
– Examples of applications involving two-dimensional arrays include
• a seating plan for a room (organized by rows and columns), a monthly
budget (organized by category and month)