Chapter 3
Chapter 3
Chapter 3
Arrays
Introduction
• Array is a container which can hold a fixed number of items and these items
should be of the same type.
• Most of the data structures make use of arrays to implement their algorithms.
• Exercise 3.1
• In this scenario, we are given the exact location (index) of an array where a
new data element (value) needs to be inserted.
• Starting from the exact location where the value will be inserted shift each
element one step downward.
• Exercise 3.2
• Exercise 3.3
• Exercise 3.4
• Exercise 3.5
• You can perform a search for an array element based on its value
or its index.
• Exercise 3.6
• Exercise 3.7