TYPES OF ARRAY:
3 TYPES
1) ONE DIMENSIONAL ARRAY
2) MULTIDIMENSIONAL ARRAY
a) 2 DIMENSIONAL ARRAY
b) 3 DIMENSIONAL ARRAY
=>ADDRESS CALCULATION IN 1-D ARRAY:
LOC(A[K])=BASE A + W[K-LB]
where w=number of bytes per memory cell.
LB stands for lower bound.
=> ADDRESS CALCULATION IN 2-D ARRAY:
(a) ROW MAJOR ORDER
LOC[(J,K)]=BASE A +W[N(J-LB)+(K-LB)]
LOC[(J,K)]=BASE A +W[M(K-LB)+(J-LB)]
=>OPERATIONS PERFORMED ON ARRAY:
1) TRAVERSAL
2) INSERTION
3) DELETION
Kindly Share The Love »»
|
|
Tweet | Save on Delicious |
No comments:
Post a Comment