## Find the Kth smallest element in the sorted generated array

Given an array arr[] of N elements and an integer K, the task is to generate an B[] with the following rules: Copy elements arr[1…N],… Read More »

- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Optimal File Merge Patterns
- Find Intersection of all Intervals
- Given count of digits 1, 2, 3, 4, find the maximum sum possible
- Find the maximum possible value of a[i] % a[j] over all pairs of i and j
- Maximum number of candies that can be bought
- Minimum number of pairs required to make two strings same
- Minimum elements to be removed such that sum of adjacent elements is always odd
- Minimum operations to make frequency of all characters equal K
- Rectangle with minimum possible difference between the length and the width
- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
- Greedy approach vs Dynamic programming
- Maximum distance between two unequal elements
- Minimum cuts required to convert a palindromic string to a different palindromic string
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Count all possible N digit numbers that satisfy the given condition
- Count common elements in two arrays containing multiples of N and M
- Find the minimum number of steps to reach M from N
- Find smallest number K such that K % p = 0 and q % K = 0
- Divide a number into two parts
- Maximal Disjoint Intervals
- Count possible moves in the given direction in a grid
- Find n positive integers that satisfy the given equations
- Find the sum of digits of a number at even and odd places
- Minimum LCM and GCD possible among all possible sub-arrays
- Find the Kth smallest element in the sorted generated array
- Count the pairs of vowels in the given string
- Create a Sorted Array Using Binary Search
- Minimum deletions required such that any number X will occur exactly X times
- Maximum count of sub-strings of length K consisting of same characters

Given an array arr[] of N elements and an integer K, the task is to generate an B[] with the following rules: Copy elements arr[1…N],… Read More »

Given an array arr[] of N elements and an integer X, the task is to find the minimum number of operations required to make sum… Read More »

Given a array ‘a[]’ of size n and number of queries q. Each query can be represented by a integer m. Your task is to… Read More »

Given an array arr1 containing integers from 1..N and another array arr2 containing integers from 1..M. Each element of arr1 is mapped to more than… Read More »

Given an array arr[] and an integer X, the task is to find the indices such that: The sum of elements on the found indices… Read More »

Given two arrays such that the first array contains multiples of an integer n which are less than or equal to k and similarly, the… Read More »

Given an array Row[] of size R where Row[i] is the sum of elements of the ith row and another array Column[] of size C… Read More »

Given an array, the task is to create a new sorted array in ascending order from the elements of the given array. Examples: Input :… Read More »

Given an array of n-elements find the longest sub-array with the greatest arithmetic mean. The length of the sub-array must be greater than 1 and… Read More »

Given a sorted array of positive integers where arr[i] > 2*arr[i-1], check whether a sub sequence exists whose sum is equal to k. Examples: Input… Read More »

Given two arrays, we have to check whether we can sort two arrays in strictly ascending order by swapping A[i] and B[i]. Examples: Input :… Read More »

Given an array containing distinct positive integers and an integer k. The task is to find the largest possible k-multiple set from the array of… Read More »

Given an integer x. The task is to convert x to the form 2n – 1 by performing the following operations in specified order on… Read More »

Given an array arr[], the task is to find the maximum distance between two unequal elements of the given array. Examples: Input: arr[] = {3,… Read More »

Given a balanced bracket sequence as a string str containing character ‘(‘ or ‘)’, the task is to find the next lexicographical order balanced sequence… Read More »