A fixed-size, sequenced collection of elements of the same data type.
Array
A sequence of data items that are of the same type, that are indexible, and that are stored contiguously
Arrays can be accessed through their index.
Array
Data type that is used to represent a large number of homogenous values.
Character Array is also known as String.
Linear Search
In this type of search, a sequential search is made over all items one by one.
Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the end of the data collection.
Binary search
A fast search algorithm with run-time complexity of Ο(log n).
Binary Search
This search algorithm works on the principle of divide and conquer.
Binary search looks for a particular item by comparing the middle most item of the collection.
For a binary search to work, it is mandatory for the target array to be sorted.
SelectionSort
This sorting algorithm is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end.
Insertion Sort
A simple sorting algorithm that builds the final sorted array (or list) one item at a time.
Selection Sort
A type of sorting where the smallest element is selected from the unsorted array and swapped with the leftmost element, and that element becomes a part of the sorted array.
Bubble Sort
This sorting algorithm is comparison-based algorithm in which each pair of adjacent elements is compared and the elements are swapped if they are not in order.
Merge Sort
A sorting technique based on divide and conquer technique.
Merge Sort
With worst-case time complexity being Ο(n log n), it is one of the most respected algorithms.
Shell Sort
A highly efficient sorting algorithm and is based on insertion sort algorithm.
Array
A sequenced collection, we can refer to the elements in the array as the first element, the second element, and so forth until we get to the last element.
Array
are data type that is used to represent a large number of homogenousvalues.
Loops
Used to read and write the elements in an array.
Overflow
Occurs when you try to store more elements in the array than its declared size.
Elements
A list of variables of the same data type that can be grouped into an array.
Underflow
Occurs when fewer elements are used or initialized than its declared size.
Types of Search
Linear Search
Binary Search
Types of Sorting
Insertion
Selection
Bubble
Merge
Shell
Quick
Sorting
The process of putting data in order either numerically or alphabetically, descending or ascending.
Expression or Size
Number of elements array can hold.
An index of an array always starts with zero (0).
When defining a character array, it is mandatory to add an extra space for the nullcharacter (\0) if the array will store a string.
A null character (\0) to indicates the end of the string.
Operations in Arrays
Searching
Insertion
Deletion
Sorting
Binary Search
Halves the searchable items and thus reduces the count of comparisons to be made to very less numbers.