Category: Divide & Conquer

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. If target exists in the array, print index of it.

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

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

A Hybrid Algorithm is an algorithm that combines two or more other algorithms that solve the same problem, either choosing one (depending on the data), or switching between them over the course of the algorithm. This is generally done to combine desired features of each, so that the overall algorithm is better than the individual …

Quicksort Algorithm

Given an array of integers, sort it using quick sort algorithm.   Quicksort is an efficient in-place sorting algorithm and can be about two or three times faster than its main competitors, 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, general-purpose sorting algorithm which produces a stable sort, which means that the implementation preserves the input order of equal elements in the sorted output.

Best online courses for Data Structures And Algorithms

Friends, this article lists some the of best courses available online on Data Structures and Algorithms. We recommend to go through them to have strong basics.   Data Structures and Algorithms by Dr. Naveen Garg Lecture Series on Data Structures and Algorithms by Dr. Naveen Garg, Department of Computer Science and Engineering, IIT Delhi. Playlist details …