Unit 1
Unit 1
What is an Array?
An array is a collection of items of the same variable type that are stored at
contiguous memory locations. It’s one of the most popular and simple data
structures and is often used to implement other data structures. Each item in
Arrays are a fundamental data structure in computer science. They are used
Types of Array
elements.
elements.
Array Operations
sequential, reverse).
● Insertion : Adding a new element to an array at a specific index.
Applications of Array
arr[5]=arr[5]-1
two-dimensional arrays.
Advantages of Array
● Arrays allow random access to elements. This makes accessing
difference in performance.
single name.
● Arrays are used to implement the other data structures like linked
array.
data.
accessed sequentially.