chapter#04
chapter#04
Data Structure
Structure &
&
Algorithms
Algorithms
arrays.
System.out.println("sum is="+sum);
}
}
} Mohammad Nawid Rahmani
Inserting operation
• In inserting operation, new items are
added to an array.
– A new items can be added:
• At the end of an array without disturbing
other elements of the array if there is an
empty elements.
• At any other place with disturbing other
element.
– Inserting at the end of Array
– Consider an array ‘Temp’ having 5 elements with
its first three elements having values as shown
below:
0 1 2 3 4