## Check if any interval completely overlaps the other

An interval is represented as a combination of start time and end time. Given a set of intervals, we need to write a program to… Read More »

- Count distinct elements in an array
- Print the nodes of binary tree as they become the leaf node
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Sort the array of strings according to alphabetical order defined by another string
- In-Place Merge Sort
- Ternary Search
- Number of pairs whose sum is a power of 2
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Minimum Increment / decrement to make array elements equal
- Smallest subarray containing minimum and maximum values
- Check if array can be sorted with one swap
- Find closest value for every element in array
- Check if it is possible to sort the array after rotating it
- Print array elements in alternatively increasing and decreasing order
- Merge K sorted arrays of different sizes | ( Divide and Conquer Approach )
- Internal details of std::sort() in C++
- Sort the array in a given index range
- Maximum sum by picking elements from two arrays in order
- Array element with minimum sum of absolute differences
- Sort only non-prime numbers of an array in increasing order
- Check if the characters of a given string are in alphabetical order
- Largest element in the array that is repeated exactly k times
- Sort an array of string of dates in ascending order
- Average of remaining elements after removing K largest and K smallest elements from array
- K-th lexicographically smallest unique substring of a given string
- Python | Sort list of list by specified index
- Check if words are sorted according to new order of alphabets
- Minimum number of bottles required to fill K glasses
- Make palindromic string non-palindromic by rearranging its letters
- Rearrange an array to maximize i*arr[i]

An interval is represented as a combination of start time and end time. Given a set of intervals, we need to write a program to… Read More »

Given an array of even number of elements, form groups of 2 using these array elements such that the difference between the group with highest… Read More »

Given an array a, we have to find minimum product possible with the subset of elements present in the array. The minimum product can be… Read More »

Given n strings, concatenate them in an order that produces the lexicographically smallest possible string. Examples: Input : a[] = [“c”, “cb”, “cba”] Output :… Read More »

Given an array of elements, task is to sort these elements using stack. Prerequisites : Stacks Examples : Input : 8 5 7 1 9… Read More »

Given a graph with N nodes numbered from 1 to N and M edges and an array of numbers from 1 to N. Check if… Read More »

You have given an array which contain 1 to n element, your task is to sort this array in an efficient way and without replace… Read More »

Given an array, we need to find the maximum sum of absolute difference of the array elements for a sequence of this array. Examples: Input… Read More »

Given a Linked List, task is to check whether the Linked List is sorted in Descending order or not? Examples : Input : 8 ->… Read More »

Given an array of n-integers. Array may contain repetitive elements but the highest frequency of any elements must not exceed two. You have to make… Read More »

In QuickSort, ideal situation is when median is always chosen as pivot as this results in minimum time. In this article, Merge Sort Tree is… Read More »

Given an array that might contain duplicates, print all distinct elements in sorted order. Examples: Input : 1, 3, 2, 2, 1 Output : 1… Read More »

You are given an array of strings. You have to sort the given array in standard way (case of alphabets matters) as well as natural… Read More »

An array is given of n length, and we need to calculate the next greater element for each element in given array. If next greater… Read More »