Largest subset having with sum less than equal to sum of respective indices
Given an array arr[], the task is to find the length of the largest subset with the sum of elements less than or equal to… Read More »
Given an array arr[], the task is to find the length of the largest subset with the sum of elements less than or equal to… Read More »
Given a string s and an integer X, our task is to find the number of distinct palindromic strings of length X from the given… Read More »
Given array arr[] of positive integers, an integer Q, and arrays X[] and Y[] of size Q. For each element in arrays X[] and Y[],… Read More »
Given a number N and two integers A and B, the task is to check if it is possible to convert the number to 1… Read More »
Given a number N, the task is to find the minimum value of N by applying below operations any number of times: Multiply N by… Read More »
Given an integer array arr[] of size N, the task is to find the minimum distance between any most and least frequent element of the… Read More »
Given an array arr[] of N positive integers where the integers are in the range from 1 to N, the task is to check whether… Read More »
Given two postive integers L and R, the task is to print the numbers in the range [L, R] which have their digits in strictly… Read More »
Given a Binary Tree, the task is to find the maximum value of Bitwise AND from any path from the root node to the leaf… Read More »
Given a string str and an integer K, the task is to find a string S such that it has exactly K subsequences of given… Read More »
Given an array arr[] of N integers, the task is to replace each element of Array with their rank in array. The rank of an… Read More »
Given an integer N, the task is to calculate the sum of first N natural numbers adding all powers of 2 twice to the sum.Examples: … Read More »
Given an array arr[] of N positive integers and a positive integer M, the task is to find the length of longest subset whose smallest… Read More »
Given an arr[] of size N whose elements are sorted in descending order. The task is to find if the given array can be sorted… Read More »
Given an array arr[] of size N, the task is to rearrange the array elements such that for every index i(1 <= i <= N… Read More »