Skip to content

Category Archives: Algorithms

Given an array arr[] of length N, the task is to remove the minimum number of elements from the array to make it a mountain… Read More
Given string s denoting a number. The task is to find the minimum number that can be formed after replacing two consecutive digits of s… Read More
Given an array arr[] containing N positive integers, the task is to minimize the total count of peaks (elements having greater value than both the… Read More
Given an integer N denoting the perimeter of a rectangle. The task is to find the number of distinct rectangles possible with a given perimeter. … Read More
Given a perfect binary tree consisting of N nodes, the task is to check if the number formed by the nodes in any level of… Read More
Given an array arr[] of N positive integers, the task is to find the smallest possible value of the last remaining element in the array… Read More
Given three numbers A, B, and K where K is 0 initially. The task is to find the minimum operations to convert K into B… Read More
Given an array arr[] of size N and an integer K, one can move from an index i to any other index j such that… Read More
Given the number D, find the smallest number N such that it has exactly four divisors and the difference between any two of them is… Read More
Two players X and Y are picking up numbers alternatively with X picking first. In the first turn X picks 1, then Y picks 2,… Read More
Given an array arr[] of N integers and an integer K, the task is to calculate the minimum cost by spilling the array elements into… Read More
Given a binary array arr[]. The task is to find the position of any 0 in arr[] such that the distance between two set bits… Read More
Given a binary tree and an integer K, the task is to print all the nodes having children with the same remainder when divided by… Read More
Given a binary tree and an integer K. The task is to count the number of nodes having children that give the same remainder when… Read More
Given an array arr[] containing integers. The task is to find the largest positive integer x missing from the array such that min(arr[]) < x… Read More

Start Your Coding Journey Now!