Skip to content

Category Archives: Sorting

Given a string S and a list of strings subs[] that stores the substrings of S and all the substrings are present only once, the… Read More
Sorting algorithms are the means to sort a given set of data in an order according to the requirement of the user. They are primarily… Read More
Circularly sorted arrays are arrays that are sorted in ascending or descending order and then rotated by a number of steps. Let us take an… Read More
Given an array arr[] of size N, the task is to find the maximum value that can be obtained by following the below conditions: Select… Read More
Given an array arr[] of size N and a positive integer K, the task is to check if the array can be reordered such that… Read More
Given two arrays A[] and B[] (B[i] < A[i]) of size N each and an integer K, the task is to perform the operation of… Read More
Given an integer N and an array arr[] of M pairs of type (Ai, Bi), the task is to generate the lexicographically smallest possible permutation… Read More
Given a 3D array of size N*M*P consisting only of English alphabet characters, the task is to print the frequency of all the elements in… Read More
Given an array arr[] of length N containing non negative integers, the task is to find the last remaining element after performing the following operations… Read More
Given an array arr[] of size N where arr[i] ≤ N, the task is to find the minimum number of operations to sort the array… Read More
Given two Arrays A[] and B[] each of size N, the task is to check if the given arrays are valid or not, based on… Read More
Given an array arr[] which contains N positive integers and an integer K. The task is to count all triplets whose XOR is equal to… Read More
Given an array arr[] of size N consisting of positive integers, the task is to check if the array can be sorted in non-decreasing order… Read More
Given string str of size N and two integers M and K (N is divisible by M), the task is to find the Kth non-overlapping… Read More
Given a linked list, the task is to sort the linked list using HeapSort. Examples: Input: list = 7 -> 698147078 -> 1123629290 -> 1849873707… Read More

Start Your Coding Journey Now!