SlideShare a Scribd company logo
Data Structure and
Algorithm
Mrs. K.KASTHURI, M.Sc., M.Phil., M.Tech.,
Assistant Professor,
Department of Information Technology,
V.V.Vanniaperumal College for Women,
1
Data Structure and Storage Structure
• Data Structure : The logical or mathematical model of a
particular organization of data .
• Storage Structure : Representation of a particular data
structure in the memory of a computer.
2
Data Structure and Storage Structure
 A data structure is a storage that is used to store and organize data.
 It is a way of arranging data on a computer
 so that it can be accessed and updated efficiently.
 A data structure is not only used for organizing the data.
 It is also used for processing, retrieving, and storing data.
 There are two types of Data Structures;
 They are Linear and Non-Linear.
 A Data structure is said to be linear if its elements from a sequence or in
other words form a linear list
 A Data structure is said to be Non-linear if its elements are not placed
sequentially or linearly.
3
4
Representation in Memory
 Two basic representation in memory
◦ Have a linear relationship between the elements represented
by means of sequential memory locations [ Arrays]
◦ Have the linear relationship between the elements
represented by means of pointer or links [ Linked List]
5
Operation on Linear Structure
 Traversal : Processing each element in the list
 Search : Finding the location of the element with a given
value or the record with a given key.
 Insertion: Adding a new element to the list
 Deletion: Removing an elements from the list
 Sorting : Arranging the elements in some type of order
 Merging : Combining two list into a single list
6
Linear Arrays
 A linear array is a list of a finite number of n
homogeneous data elements ( that is data elements of
the same type)
◦ The elements are of the arrays are referenced respectively
by an index set consisting of n consecutive numbers
◦ The elements of the arrays are stored respectively in
successive memory locations
7
Linear Arrays
 The number n of elements is called the
length or size of the array.
 The index set consists of the integer 1, 2, …
n
 Length or the number of data elements of
the array can be obtained from the index set
by
Length = UB – LB + 1 where UB is the
largest index called the upper bound and LB
is the smallest index called the lower bound
of the arrays
8
Linear Arrays
 Element of an array A may be denoted by
◦ Subscript notation A1, A2, , …. , An
◦ Parenthesis notation A(1), A(2), …. , A(n)
◦ Bracket notation A[1], A[2], ….. , A[n]
 The number K in A[K] is called subscript
or an index and A[K] is called a
subscripted variable
9
Representation of Linear Array in Memory
10
Representation of Linear Array in Memory
 Let LA be a linear array in the memory of the
computer
 LOC(LA[K]) = address of the element
LA[K] of the array LA
 The element of LA are stored in the
successive memory cells
 Computer does not need to keep track of the
address of every element of LA, but need to
track only the address of the first element of
the array denoted by Base(LA) called the
base address of LA
11
Representation of Linear Array in Memory
 LOC(LA[K]) = Base(LA) + w(K – lower
bound) where w is the number of words
per memory cell of the array LA
 w is a size of the data type.
12
Traversing Linear Arrays
 Traversing is accessing and processing
(visiting ) each element of the data
structure exactly ones
13
•••
Linear Array
Traversing Linear Arrays
 Traversing is accessing and processing
(aka visiting ) each element of the data
structure exactly ones
14
•••
Linear Array
Traversing Linear Arrays
 Traversing is accessing and processing
(aka visiting ) each element of the data
structure exactly ones
15
•••
Linear Array
Traversing Linear Arrays
 Traversing is accessing and processing
(aka visiting ) each element of the data
structure exactly ones
16
•••
Linear Array
Traversing Linear Arrays
 Traversing is accessing and processing
(aka visiting ) each element of the data
structure exactly ones
17
•••
Linear Array
Traversing Linear Arrays
 Traversing is accessing and processing
(aka visiting ) each element of the data
structure exactly ones
18
•••
Linear Array
Traversing Linear Arrays
 Traversing is accessing and processing
(aka visiting ) each element of the data
structure exactly ones
19
•••
Linear Array
1. Repeat for K = LB to UB
Apply PROCESS to LA[K]
[End of Loop]
2. Exit
Inserting and Deleting
 Insertion: Adding an element
◦ Beginning
◦ Middle
◦ End
 Deletion: Removing an element
◦ Beginning
◦ Middle
◦ End
20
Insertion
1 Brown
2 Davis
3 Johnson
4 Smith
5 Wagner
6
7
8
21
1 Brown
2 Davis
3 Johnson
4 Smith
5 Wagner
6 Ford
7
8
Insert Ford at the End of Array
Insertion
1 Brown
2 Davis
3 Johnson
4 Smith
5 Wagner
6
7
8
22
1 Brown
2 Davis
3 Johnson
4 Smith
5
6 Wagner
7
8
Insert Ford as the 3rd Element of Array
1 Brown
2 Davis
3 Johnson
4
5 Smith
6 Wagner
7
8
1 Brown
2 Davis
3
4 Johnson
5 Smith
6 Wagner
7
8
Ford
Insertion is not Possible without
loss of data if the array is FULL
Deletion
1 Brown
2 Davis
3 Ford
4 Johnson
5 Smith
6 Taylor
7 Wagner
8
23
1 Brown
2 Davis
3 Ford
4 Johnson
5 Smith
6 Taylor
7
8
Deletion of Wagner at the End of Array
Deletion
1 Brown
2 Davis
3 Ford
4 Johnson
5 Smith
6 Taylor
7 Wagner
8
24
1 Brown
2
3 Ford
4 Johnson
5 Smith
6 Taylor
7 Wagner
8
Deletion of Davis from the Array
1 Brown
2 Ford
3
4 Johnson
5 Smith
6 Taylor
7 Wagner
8
1 Brown
2 Ford
3 Johnson
4
5 Smith
6 Taylor
7 Wagner
8
Deletion
1 Brown
2 Ford
3 Johnson
4 Smith
5 Taylor
6 Wagner
7
8
25
No data item can be deleted from an
empty array
Insertion Algorithm
 INSERT (LA, N , K , ITEM) [LA is a linear
array with N elements and K is a positive integers
such that K ≤ N. This algorithm insert an element
ITEM into the Kth position in LA ]
1. [Initialize Counter] Set J := N
2. Repeat Steps 3 and 4 while J ≥ K
3. [Move the Jth element downward ] Set LA[J +
1] := LA[J]
4. [Decrease Counter] Set J := J -1
5 [Insert Element] Set LA[K] := ITEM
6. [Reset N] Set N := N +1;
7. Exit
26
Deletion Algorithm
 DELETE (LA, N , K , ITEM) [LA is a linear
array with N elements and K is a positive integers
such that K ≤ N. This algorithm deletes Kth
element from LA ]
1. Set ITEM := LA[K]
2. Repeat for J = K to N -1:
[Move the J + 1st element upward] Set LA[J]
:= LA[J + 1]
3. [Reset the number N of elements] Set N :=
N - 1;
4. Exit
27
Multidimensional Array
 One-Dimensional Array
 Two-Dimensional Array
 Three-Dimensional Array
 Some programming Language allows as
many as 7 dimension
28
Two-Dimensional Array
 A Two-Dimensional m x n array A is a
collection of m . n data elements such
that each element is specified by a pair of
integer (such as J, K) called subscript with
property that
1 ≤ J ≤ m and 1 ≤ K ≤ n
The element of A with first subscript J and
second subscript K will be denoted by AJ,K
or A[J][K]
29
2D Arrays
The elements of a 2-dimensional array a is shown as below
a[0][0] a[0][1] a[0][2]
a[0][3]
a[1][0] a[1][1] a[1][2]
a[1][3]
a[2][0] a[2][1] a[2][2]
a[2][3]
Rows Of A 2D Array
a[0][0] a[0][1] a[0][2] a[0][3] row 0
a[1][0] a[1][1] a[1][2] a[1][3] row 1
a[2][0] a[2][1] a[2][2] a[2][3] row 2
Columns Of A 2D Array
a[0][0] a[0][1] a[0][2] a[0][3]
a[1][0] a[1][1] a[1][2] a[1][3]
a[2][0] a[2][1] a[2][2] a[2][3]
column 0 column 1 column 2 column 3
 Let A be a two-dimensional array m x n
 The array A will be represented in the
memory by a block of m x n sequential
memory location
 Programming language will store array A
either
◦ Column by Column (Called Column-Major
Order) Ex: Fortran, MATLAB
◦ Row by Row (Called Row-Major Order) Ex:
C, C++ , Java
33
2D Array in Memory
A Subscript
(1,1)
(2,1)
(3,1)
(1,2)
(2,2)
(3,2)
(1,3)
(2,3)
(3,3)
(1,4)
(2,4)
(3,4)
34
Column
1
Column
2
Column
3
Column
4
A Subscript
(1,1)
(1,2)
(1,3)
(1,4)
(2,1)
(2,2)
(2,3)
(2,4)
(3,1)
(3,2)
(3,3)
(3,4)
Row 1
Row 3
Row 2
Column-Major Order Row-Major Order
2D Array
 LOC(LA[K]) = Base(LA) + w(K -1)
 LOC(A[J,K]) of A[m,n]
Column-Major Order
LOC(A[J,K]) = Base(A) + w[m(K-1) + (J-1)]
Row-Major Order
LOC(A[J,K]) = Base(A) + w[n(J-1) + (K-1)]
35
Multidimensional Array
 Let C be a n-dimensional array
 Length Li of dimension i of C is the
number of elements in the index set
Li = UB – LB + 1
 For a given subscript Ki, the effective
index Ei of Li is the number of indices
preceding Ki in the index set
Ei = Ki – LB
36
Multidimensional Array
 Address LOC(C[K1,K2, …., Kn]) of an arbitrary
element of C can be obtained as
Column-Major Order
Base( C) + w[((( … (ENLN-1 + EN-1)LN-
2) + ….. +E3)L2+E2)L1+E1]
Row-Major Order
Base( C) + w[(… ((E1L2 + E2)L3 +
E3)L4 + ….. +EN-1)LN +EN]
37

More Related Content

PPTX
Lecture 3 data structures and algorithms
PPTX
PPTX
2.DS Array
PPTX
Data Structure Introduction- Arrays, Matrix, Linked List
PPTX
Basic of array and data structure, data structure basics, array, address calc...
PPTX
Data strutcure and annalysis topic array
PDF
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
PPTX
2. Array in Data Structure
Lecture 3 data structures and algorithms
2.DS Array
Data Structure Introduction- Arrays, Matrix, Linked List
Basic of array and data structure, data structure basics, array, address calc...
Data strutcure and annalysis topic array
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
2. Array in Data Structure

Similar to arrays in data structure.pptx (20)

PDF
cluod.pdf
PPTX
datastructureppt-190327174340 (1).pptx
PPTX
array.pptx
PPTX
Ist year Msc,2nd sem module1
PPTX
Data structure using c module 1
PPTX
polynomial_linked list for electrical engineer
PDF
Data structure ppt
DOCX
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
PPT
Unit 1 introduction to data structure
PPT
Two Dimensional Array
PPT
Data structure lecture 1
PPT
arrays1.ppt python programme arrays insertion
PDF
M v bramhananda reddy dsa complete notes
PPTX
data structure unit -1_170434dd7400.pptx
PDF
PPTX
Arrays.pptx
PPTX
introduction_dst.pptx
PDF
Python Unit 5 Questions n Notes.pdf
PDF
DS Complete notes for Computer science and Engineering
PPTX
01245xsfwegrgdvdvsdfgvsdgsdfgsfsdgsdgsdgdg
cluod.pdf
datastructureppt-190327174340 (1).pptx
array.pptx
Ist year Msc,2nd sem module1
Data structure using c module 1
polynomial_linked list for electrical engineer
Data structure ppt
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
Unit 1 introduction to data structure
Two Dimensional Array
Data structure lecture 1
arrays1.ppt python programme arrays insertion
M v bramhananda reddy dsa complete notes
data structure unit -1_170434dd7400.pptx
Arrays.pptx
introduction_dst.pptx
Python Unit 5 Questions n Notes.pdf
DS Complete notes for Computer science and Engineering
01245xsfwegrgdvdvsdfgvsdgsdfgsfsdgsdgsdgdg
Ad

Recently uploaded (20)

PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PPTX
Introduction to Building Materials
PDF
Trump Administration's workforce development strategy
PDF
1_English_Language_Set_2.pdf probationary
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
RMMM.pdf make it easy to upload and study
PDF
Empowerment Technology for Senior High School Guide
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Introduction to Building Materials
Trump Administration's workforce development strategy
1_English_Language_Set_2.pdf probationary
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
A systematic review of self-coping strategies used by university students to ...
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
What if we spent less time fighting change, and more time building what’s rig...
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
202450812 BayCHI UCSC-SV 20250812 v17.pptx
RMMM.pdf make it easy to upload and study
Empowerment Technology for Senior High School Guide
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
Chinmaya Tiranga quiz Grand Finale.pdf
Computing-Curriculum for Schools in Ghana
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Ad

arrays in data structure.pptx

  • 1. Data Structure and Algorithm Mrs. K.KASTHURI, M.Sc., M.Phil., M.Tech., Assistant Professor, Department of Information Technology, V.V.Vanniaperumal College for Women, 1
  • 2. Data Structure and Storage Structure • Data Structure : The logical or mathematical model of a particular organization of data . • Storage Structure : Representation of a particular data structure in the memory of a computer. 2
  • 3. Data Structure and Storage Structure  A data structure is a storage that is used to store and organize data.  It is a way of arranging data on a computer  so that it can be accessed and updated efficiently.  A data structure is not only used for organizing the data.  It is also used for processing, retrieving, and storing data.  There are two types of Data Structures;  They are Linear and Non-Linear.  A Data structure is said to be linear if its elements from a sequence or in other words form a linear list  A Data structure is said to be Non-linear if its elements are not placed sequentially or linearly. 3
  • 4. 4
  • 5. Representation in Memory  Two basic representation in memory ◦ Have a linear relationship between the elements represented by means of sequential memory locations [ Arrays] ◦ Have the linear relationship between the elements represented by means of pointer or links [ Linked List] 5
  • 6. Operation on Linear Structure  Traversal : Processing each element in the list  Search : Finding the location of the element with a given value or the record with a given key.  Insertion: Adding a new element to the list  Deletion: Removing an elements from the list  Sorting : Arranging the elements in some type of order  Merging : Combining two list into a single list 6
  • 7. Linear Arrays  A linear array is a list of a finite number of n homogeneous data elements ( that is data elements of the same type) ◦ The elements are of the arrays are referenced respectively by an index set consisting of n consecutive numbers ◦ The elements of the arrays are stored respectively in successive memory locations 7
  • 8. Linear Arrays  The number n of elements is called the length or size of the array.  The index set consists of the integer 1, 2, … n  Length or the number of data elements of the array can be obtained from the index set by Length = UB – LB + 1 where UB is the largest index called the upper bound and LB is the smallest index called the lower bound of the arrays 8
  • 9. Linear Arrays  Element of an array A may be denoted by ◦ Subscript notation A1, A2, , …. , An ◦ Parenthesis notation A(1), A(2), …. , A(n) ◦ Bracket notation A[1], A[2], ….. , A[n]  The number K in A[K] is called subscript or an index and A[K] is called a subscripted variable 9
  • 10. Representation of Linear Array in Memory 10
  • 11. Representation of Linear Array in Memory  Let LA be a linear array in the memory of the computer  LOC(LA[K]) = address of the element LA[K] of the array LA  The element of LA are stored in the successive memory cells  Computer does not need to keep track of the address of every element of LA, but need to track only the address of the first element of the array denoted by Base(LA) called the base address of LA 11
  • 12. Representation of Linear Array in Memory  LOC(LA[K]) = Base(LA) + w(K – lower bound) where w is the number of words per memory cell of the array LA  w is a size of the data type. 12
  • 13. Traversing Linear Arrays  Traversing is accessing and processing (visiting ) each element of the data structure exactly ones 13 ••• Linear Array
  • 14. Traversing Linear Arrays  Traversing is accessing and processing (aka visiting ) each element of the data structure exactly ones 14 ••• Linear Array
  • 15. Traversing Linear Arrays  Traversing is accessing and processing (aka visiting ) each element of the data structure exactly ones 15 ••• Linear Array
  • 16. Traversing Linear Arrays  Traversing is accessing and processing (aka visiting ) each element of the data structure exactly ones 16 ••• Linear Array
  • 17. Traversing Linear Arrays  Traversing is accessing and processing (aka visiting ) each element of the data structure exactly ones 17 ••• Linear Array
  • 18. Traversing Linear Arrays  Traversing is accessing and processing (aka visiting ) each element of the data structure exactly ones 18 ••• Linear Array
  • 19. Traversing Linear Arrays  Traversing is accessing and processing (aka visiting ) each element of the data structure exactly ones 19 ••• Linear Array 1. Repeat for K = LB to UB Apply PROCESS to LA[K] [End of Loop] 2. Exit
  • 20. Inserting and Deleting  Insertion: Adding an element ◦ Beginning ◦ Middle ◦ End  Deletion: Removing an element ◦ Beginning ◦ Middle ◦ End 20
  • 21. Insertion 1 Brown 2 Davis 3 Johnson 4 Smith 5 Wagner 6 7 8 21 1 Brown 2 Davis 3 Johnson 4 Smith 5 Wagner 6 Ford 7 8 Insert Ford at the End of Array
  • 22. Insertion 1 Brown 2 Davis 3 Johnson 4 Smith 5 Wagner 6 7 8 22 1 Brown 2 Davis 3 Johnson 4 Smith 5 6 Wagner 7 8 Insert Ford as the 3rd Element of Array 1 Brown 2 Davis 3 Johnson 4 5 Smith 6 Wagner 7 8 1 Brown 2 Davis 3 4 Johnson 5 Smith 6 Wagner 7 8 Ford Insertion is not Possible without loss of data if the array is FULL
  • 23. Deletion 1 Brown 2 Davis 3 Ford 4 Johnson 5 Smith 6 Taylor 7 Wagner 8 23 1 Brown 2 Davis 3 Ford 4 Johnson 5 Smith 6 Taylor 7 8 Deletion of Wagner at the End of Array
  • 24. Deletion 1 Brown 2 Davis 3 Ford 4 Johnson 5 Smith 6 Taylor 7 Wagner 8 24 1 Brown 2 3 Ford 4 Johnson 5 Smith 6 Taylor 7 Wagner 8 Deletion of Davis from the Array 1 Brown 2 Ford 3 4 Johnson 5 Smith 6 Taylor 7 Wagner 8 1 Brown 2 Ford 3 Johnson 4 5 Smith 6 Taylor 7 Wagner 8
  • 25. Deletion 1 Brown 2 Ford 3 Johnson 4 Smith 5 Taylor 6 Wagner 7 8 25 No data item can be deleted from an empty array
  • 26. Insertion Algorithm  INSERT (LA, N , K , ITEM) [LA is a linear array with N elements and K is a positive integers such that K ≤ N. This algorithm insert an element ITEM into the Kth position in LA ] 1. [Initialize Counter] Set J := N 2. Repeat Steps 3 and 4 while J ≥ K 3. [Move the Jth element downward ] Set LA[J + 1] := LA[J] 4. [Decrease Counter] Set J := J -1 5 [Insert Element] Set LA[K] := ITEM 6. [Reset N] Set N := N +1; 7. Exit 26
  • 27. Deletion Algorithm  DELETE (LA, N , K , ITEM) [LA is a linear array with N elements and K is a positive integers such that K ≤ N. This algorithm deletes Kth element from LA ] 1. Set ITEM := LA[K] 2. Repeat for J = K to N -1: [Move the J + 1st element upward] Set LA[J] := LA[J + 1] 3. [Reset the number N of elements] Set N := N - 1; 4. Exit 27
  • 28. Multidimensional Array  One-Dimensional Array  Two-Dimensional Array  Three-Dimensional Array  Some programming Language allows as many as 7 dimension 28
  • 29. Two-Dimensional Array  A Two-Dimensional m x n array A is a collection of m . n data elements such that each element is specified by a pair of integer (such as J, K) called subscript with property that 1 ≤ J ≤ m and 1 ≤ K ≤ n The element of A with first subscript J and second subscript K will be denoted by AJ,K or A[J][K] 29
  • 30. 2D Arrays The elements of a 2-dimensional array a is shown as below a[0][0] a[0][1] a[0][2] a[0][3] a[1][0] a[1][1] a[1][2] a[1][3] a[2][0] a[2][1] a[2][2] a[2][3]
  • 31. Rows Of A 2D Array a[0][0] a[0][1] a[0][2] a[0][3] row 0 a[1][0] a[1][1] a[1][2] a[1][3] row 1 a[2][0] a[2][1] a[2][2] a[2][3] row 2
  • 32. Columns Of A 2D Array a[0][0] a[0][1] a[0][2] a[0][3] a[1][0] a[1][1] a[1][2] a[1][3] a[2][0] a[2][1] a[2][2] a[2][3] column 0 column 1 column 2 column 3
  • 33.  Let A be a two-dimensional array m x n  The array A will be represented in the memory by a block of m x n sequential memory location  Programming language will store array A either ◦ Column by Column (Called Column-Major Order) Ex: Fortran, MATLAB ◦ Row by Row (Called Row-Major Order) Ex: C, C++ , Java 33
  • 34. 2D Array in Memory A Subscript (1,1) (2,1) (3,1) (1,2) (2,2) (3,2) (1,3) (2,3) (3,3) (1,4) (2,4) (3,4) 34 Column 1 Column 2 Column 3 Column 4 A Subscript (1,1) (1,2) (1,3) (1,4) (2,1) (2,2) (2,3) (2,4) (3,1) (3,2) (3,3) (3,4) Row 1 Row 3 Row 2 Column-Major Order Row-Major Order
  • 35. 2D Array  LOC(LA[K]) = Base(LA) + w(K -1)  LOC(A[J,K]) of A[m,n] Column-Major Order LOC(A[J,K]) = Base(A) + w[m(K-1) + (J-1)] Row-Major Order LOC(A[J,K]) = Base(A) + w[n(J-1) + (K-1)] 35
  • 36. Multidimensional Array  Let C be a n-dimensional array  Length Li of dimension i of C is the number of elements in the index set Li = UB – LB + 1  For a given subscript Ki, the effective index Ei of Li is the number of indices preceding Ki in the index set Ei = Ki – LB 36
  • 37. Multidimensional Array  Address LOC(C[K1,K2, …., Kn]) of an arbitrary element of C can be obtained as Column-Major Order Base( C) + w[((( … (ENLN-1 + EN-1)LN- 2) + ….. +E3)L2+E2)L1+E1] Row-Major Order Base( C) + w[(… ((E1L2 + E2)L3 + E3)L4 + ….. +EN-1)LN +EN] 37