## Count occurrences of a number in a sorted array with duplicates

Given a sorted array of integers containing duplicates, count occurrences of a number provided. If the element is not found in the array, report that as well.

## Find first or last occurrence of a given number in a sorted array

Given a sorted array of integers, find index of first or last occurrence of a given number. If the element is not found in the array, report that as well.

## Search an element in a circular sorted array

Given a circular sorted array of integers, search an element in it. Assume there are no duplicates in the array and the rotation is in anti-clockwise direction.

## Find number of rotations in a circularly sorted array

Given a circularly sorted array of integers, find the number of times the array is rotated. Assume there are no duplicates in the array and the rotation is in anti-clockwise direction.

## 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.

## Binary Search Algorithm | Recursive & Iterative Implementation

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 using Binary Search Algorithm in C and Java. 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.

## Iterative Implementation of Quicksort

Write iterative version of recursive Quicksort algorithm.

## 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.