## Quick Sort using Hoare’s Partitioning scheme

Implement Quicksort algorithm using Hoare’s Partitioning scheme.

Read More Quick Sort using Hoare’s Partitioning schemeCoding made easy

Implement Quicksort algorithm using Hoare’s Partitioning scheme.

Read More Quick Sort using Hoare’s Partitioning schemeImplement Quicksort efficiently for inputs containing many repeated elements. Quicksort exhibits poor performance for inputs that contain many repeated elements. The problem is clearly visible when all the input elements are equal. Then at each recursion, the left partition is empty (no input values are less than the pivot), and the right partition …

Read More Quicksort using Dutch National Flag AlgorithmIn this article, we will implement Ternary Search algorithm and compare its performance with Binary Search.

Read More Ternary Search vs Binary searchThe longest increasing subsequence problem is to find a subsequence of a given sequence in which the subsequence’s elements are in sorted order, lowest to highest, and in which the subsequence is as long as possible. This subsequence is not necessarily contiguous, or unique.

Read More Longest Increasing SubsequenceGiven a linked list, 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. Mergesort is a comparison sort, i.e. it can sort items of any type for …

Read More Merge Sort for Singly Linked ListGiven two integers x and n where n is non-negative, efficiently compute the value of power function pow(x, n).

Read More Efficiently implement power function | Recursive and IterativeGiven an array of integers, find maximum sum of the subarray among all subarrays possible.

Read More Maximum Sum Subarray using Divide & ConquerGiven an array, find peak element in it. A peak element is an element that is greater than its neighbors.

Read More Find the peak element in an arrayGiven a sorted binary array, efficiently find the number of 1’s in it.

Read More Find number of 1’s in a sorted binary arrayGiven a nearly sorted array such that each of the N elements may be misplaced by no more than one position from the correct sorted order, efficiently search a given element in it. Report if the element is not present in the input array. An element at index i in correct sorted order can …

Read More Search in a nearly sorted array in O(logn) timeGiven a sorted array of integers, find floor and ceil of a given number in it. The floor and ceiling map the given number to the largest previous or the smallest following integer, respectively. More precisely, for a number x, floor(x) is the largest integer less than or equal to x and ceiling(x) is the …

Read More Find Floor and Ceil of a number in a sorted arrayGiven a sorted array of distinct non-negative integers, find smallest missing element in it.

Read More Find smallest missing element from a sorted arrayGiven 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.

Read More Count occurrences of a number in a sorted array with duplicatesGiven 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.

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