Unit 2
Sequential Organisation
Advantages
Disadvantages
Array as ADT
Operations on Array
Insertion
Traversal
Deletion
Merging
Storage Representation
Row Major Representation
Column Major Representation
Operations on Multidimensional Arrays
Display
Addition
Multiplication
Transpose
Polynomial
Representation
Operations
Addition
Multiplication
Evaluation
Sparse Matrix
Representation
Operations
Addition
Transpose
Fast Transpose
Multiplication
Time and Space Trade-off
Unit 2 1
, Sequential Organisation
Arrays are referred to as sequential organisation that means data in arrays are stored in
sequence. Array is a set of consecutive memory locations which contains similar data
elements. Array is basically a set of pair-index and value.
data − type = name − of − array[size]
Advantages
1. Elements can be retrieved or stored very efficiently with the help of index or memory
location.
2. All elements are stored in continuous memory locations. Hence searching of
element from sequential organisation is easy.
Disadvantages
1. Insertion and deletion of elements becomes complicated due to sequential nature
2. For storing the data large continuous free block of memory is required.
3. Memory fragmentation occurs if we remove the elements randomly.
Array as ADT
AbstractDataType Array {
Instances: an array A of some size, index i and total
number of elements in the array of n
Operations:
1. Create() - operation that creates an array
2. Insert() - operation that inserts the element in an array
3. Delete() - operation that deletes the elements from array
4. Display()- operation displays the elements of the array
}
Operations on Array
Insertion
Unit 2 2
Unit 2
Sequential Organisation
Advantages
Disadvantages
Array as ADT
Operations on Array
Insertion
Traversal
Deletion
Merging
Storage Representation
Row Major Representation
Column Major Representation
Operations on Multidimensional Arrays
Display
Addition
Multiplication
Transpose
Polynomial
Representation
Operations
Addition
Multiplication
Evaluation
Sparse Matrix
Representation
Operations
Addition
Transpose
Fast Transpose
Multiplication
Time and Space Trade-off
Unit 2 1
, Sequential Organisation
Arrays are referred to as sequential organisation that means data in arrays are stored in
sequence. Array is a set of consecutive memory locations which contains similar data
elements. Array is basically a set of pair-index and value.
data − type = name − of − array[size]
Advantages
1. Elements can be retrieved or stored very efficiently with the help of index or memory
location.
2. All elements are stored in continuous memory locations. Hence searching of
element from sequential organisation is easy.
Disadvantages
1. Insertion and deletion of elements becomes complicated due to sequential nature
2. For storing the data large continuous free block of memory is required.
3. Memory fragmentation occurs if we remove the elements randomly.
Array as ADT
AbstractDataType Array {
Instances: an array A of some size, index i and total
number of elements in the array of n
Operations:
1. Create() - operation that creates an array
2. Insert() - operation that inserts the element in an array
3. Delete() - operation that deletes the elements from array
4. Display()- operation displays the elements of the array
}
Operations on Array
Insertion
Unit 2 2