## k-th missing element in an unsorted array

Given an unsorted sequence a[], the task is to find the K-th missing contiguous element in the increasing sequence of the array elements i.e. consider… Read More »

- Python list sort()
- Quick Sort vs Merge Sort
- Sort elements by frequency | Set 5 (using Java Map)
- Elements that occurred only once in the array
- Print the nodes of binary tree as they become the leaf node
- Count distinct elements in an array
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Sort the array of strings according to alphabetical order defined by another string
- Number of pairs whose sum is a power of 2
- In-Place Merge Sort
- Stable QuickSort
- Find the largest number that can be formed with the given digits
- Smallest subarray containing minimum and maximum values
- Sort first k values in ascending order and remaining n-k values in descending order
- Sort an array of pairs using Java Pair and Comparator
- Sort a nearly sorted array using STL
- Ternary Search
- Find a point such that sum of the Manhattan distances is minimized
- Print array elements in alternatively increasing and decreasing order
- Check if array can be sorted with one swap
- Check if it is possible to sort the array after rotating it
- Bubble Sort On Doubly Linked List
- Maximum sum by picking elements from two arrays in order
- Maximize the profit by selling at-most M products
- Number of paths from source to destination in a directed acyclic graph
- Minimum Increment / decrement to make array elements equal
- Find closest value for every element in array
- Sort only non-prime numbers of an array in increasing order
- Maximum Sum of Products of Two Arrays
- Array element with minimum sum of absolute differences

Given an unsorted sequence a[], the task is to find the K-th missing contiguous element in the increasing sequence of the array elements i.e. consider… Read More »

Given a string S of length N. The task is to find the minimum number of steps required on strings, so that it has exactly… Read More »

Given an array arr[] of binary strings, the task is to calculate the bitwise AND of all of these strings and print the resultant string.… Read More »

Given a set of points, the task is to find the covex hull of the given points. The convex hull is the smallest convex polygon… Read More »

Given an array arr[] containing N integers and two integers X and Y. Consider N line segments, where each line segment has starting and ending… Read More »

Given an array arr[] of N non-negative integers, the task is to sort these integers according to sum of their digits. Examples: Input: arr[] =… Read More »

Given an array arr[] and an integer k, the task is to find the maximum product from the array such that the frequency sum of… Read More »

Given an array arr[] containing N integers, the task is to print k different permutations of indices such that the values at those indices form… Read More »

Given k sorted arrays of different length, merge them into a single array such that the merged array is also sorted. Examples: Input : {{3,… Read More »

Given an array consisting of even number of elements, the task is to divide the array into M group of elements (every group must contain… Read More »

Giving k sorted arrays, each of size N, the task is to merge them into a single sorted array. Examples: Input : arr[][] = {{5,… Read More »

There are N distinct integers arranged on a circle. The distance between any two adjacent numbers is 1. The task is to travel on this… Read More »

Given a string str containing lowercase alphabets (a – z). The task is to print the string after rearranging some characters such that the string… Read More »

Given an array arr[] of N integers, the task is to find an element x from the array such that |arr[0] – x| + |arr[1]… Read More »

Given an integer K and a matrix of N rows and M columns, the task is to find the minimum number of operations required to… Read More »