Array
[Linear Data structure
Non Primitive Data Stucture]
Array Operations
• Creation
• Insertion
at beginning
at end
at any position
• Deletion
at beginning
at end
at any position
• Searching
Array Total Capacity
Size of an array
Element to be inserted
Element to be inserted
Shifting
Insert the element at Array printing
starting index
Element to be inserted
Position index
Insert the element at
shifts all elements to the right upto
position index
position index
Reverse of an array
Reverse of an Array
Pseudo code: Reverse of an array
BEGIN
READ n
READ array A[0…n−1]
i←0
j←n−1
WHILE i < j DO
SWAP A[i], A[j]
i←i+1
j←j−1
END WHILE
PRINT A
END