Null Data Structures
Null Data Structures
CHAPTER 4
BY,
AMOGH
9. Define searching.
A: The process of finding the location of a data item in
the given collection of data items is called as searching.
Row-major order :
Let A be the array of order m x n. In row-major order, all
the first-row elements are stored in sequential
memory locations and then all the second-row
elements are stored and so on.
Base(A) is the address of the first element. The memory
address of any element A[I][J] can be obtained by the
formula :-
LOC(A[I][J]) = Base(A) + W[n(I-LB) + (J-LB)]
where W is the number of words per memory
location.
W = 1, I = 12, J = 3
Step 4: Exit