Exponential search

Given a sorted array of integers and a target value, find out if a target exists in the array or not in O(log(n)) time. If target exists in the array, print index of it.

Interpolation search

Given a sorted array of integers and a target, find out if a target exists in the array or not using interpolation search. If target exists in the array, print index of it.

Inversion count of an array

Given an array, find the number of inversions of it. If (i < j) and (A[i] > A[j]) then the pair (i, j) is called an inversion of an array A. We need to count all such pairs in the array.

Hybrid QuickSort Algorithm

In this article, hybrid of Quick Sort algorithm with Insertion Sort is discussed to achieve better performance.

Quicksort Algorithm

Given an array of integers, sort it using quicksort algorithm.   Quicksort is an efficient in-place¬†sorting algorithm, which usually performs about two to three times faster than merge sort and heapsort when implemented well.¬†

Merge Sort Algorithm

Given an array of integers, sort it using merge sort algorithm.     Merge sort is an efficient in-place sorting algorithm which produces a stable sort, which means that if two elements have the same value, they holds same relative position in the output as they did in the input.