## Largest number less than X having at most K set bits

Given an integer X > 1 and an integer K > 0, the task is to find the greatest odd number < X such that… Read More »

- Coin game of two corners (Greedy Approach)
- Dijkstra's shortest path with minimum edges
- Final cell position in the matrix
- Minimum number of sets with numbers less than Y
- CPU Scheduling | Longest Remaining Time First (LRTF) Program
- Remove exactly one element from the array such that max - min is minimum
- Check if an array is Wave Array
- Minimum Increment / decrement to make array elements equal
- Minimum cost to reach a point N from 0 with two different operations allowed
- Check whether all the rotations of a given number is greater than or equal to the given number or not
- Check if it is possible to sort the array after rotating it
- Maximize the profit by selling at-most M products
- Find length of longest Fibonacci like subsequence
- Maximum sum by picking elements from two arrays in order
- Minimize the maximum minimum difference after one removal from array
- Rectangle with minimum possible difference between the length and the width
- Minimum elements to be removed such that sum of adjacent elements is always odd
- K-th lexicographically smallest unique substring of a given string
- Find maximum distance between any city and station
- Maximum litres of water that can be bought with N Rupees
- Minimum number of 1's to be replaced in a binary array
- Python Program to check if given array is Monotonic
- Count all possible N digit numbers that satisfy the given condition
- Minimize the difference between minimum and maximum elements
- Maximum sum of all elements of array after performing given operations
- Count valid pairs in the array satisfying given conditions
- Minimum number of operations required to reduce N to 1
- Count subarrays with Prime sum
- Check if a string can be rearranged to form special palindrome
- Minimum number of bottles required to fill K glasses

Given an integer X > 1 and an integer K > 0, the task is to find the greatest odd number < X such that… Read More »

Given two integers L and R, the task is to find the greatest divisor that divides all the natural numbers in the range [L, R].… Read More »

Given an array of 2 * n elements, the task is to construct and print an array of n element such that the mean of… Read More »

Given an array consisting of N positive integer numbers. The task is to remove exactly one element from this array to minimize max(a) – min(a)… Read More »

You have an unlimited number of 10-rupee coins and exactly one coin of r rupee and you need to buy minimum items each of cost… Read More »

Given an array arr[] of size n ≥ 3, the task is to find the minimum possible difference between the the maximum and the minimum… Read More »

Given an array of integers. The task is to find the minimum number of consecutive sequences that can be formed using the elements of the… Read More »

Given a string str and an integer array width[] where: width[0] = width of character ‘a’ width[1] = width of character ‘b’ … width[25] =… Read More »

Given two arrays of size N and two integers X and Y indicating the maximum number of elements one can pick from array A and… Read More »

Given an array arr of N (even) integer elements. The task is to check if it is possible to reorder the elements of the array… Read More »

Given an array of integers arr[], the task is to count the number of valid pairs of elements from arr. A pair (arr[x], arr[y]) is… Read More »

Given an array of integers. The task is to find the maximum sum of all the elements of the array after performing the given two… Read More »

Given an array of integers and an integer . It is allowed to modify an element either by increasing or decreasing them by k (only… Read More »

Prerequisite: Dijkstra’s shortest path algorithm Given an adjacency matrix graph representing paths between the nodes in the given graph. The task is to find the… Read More »

Prerequisite – CPU Scheduling | Longest Remaining Time First (LRTF) algorithm We have given some process with arrival time and Burst Time and we have… Read More »