Skip to content

Category Archives: Algorithms

Given a positive integer N, the task is to find the number of ways to fill the board of dimension 2*N with a tile of… Read More
Given three arrays X[], Y[], and Z[] each consisting of N integers, the task is to find the maximum number of triplets (X[i], Y[i], Z[i])… Read More
Given a binary string S of size N, the task is to find the minimum numbers of 0s that must be removed from the string… Read More
Given two integers X, Y and a range [L, R], the task is to count the number of integers from the range X and Y… Read More
Given an array arr[] consisting of N integers and a positive integer K, the task is to find the number of subarrays of size K… Read More
Given a linked list of N nodes where each node represents digits of a number and a single-digit number M, the task is to multiply… Read More
Given an array arr[] of size N, the task is to sort the array in descending order starting from the mid of the array having… Read More
Given an array, arr[] of N distinct integers and an integer K, the task is to rearrange the given array in such a way, that… Read More
Given an positive integer N, the task is to find the number of triplets (X, Y, Z) such that the sum of product of any… Read More
Given a string S consisting of N lowercase characters and character ‘?’ and a positive integer K, the task is to replace each character ‘?’… Read More
Given an array arr[] of size N consisting of only the first M natural numbers, the task is to find the minimum length of the… Read More
Given a positive integer N, the task is to find the two smallest integers A and B such that the Bitwise XOR of A and… Read More
Given an array arr[] consisting of N integers, the task is to check if the sum of K most frequent array elements and the sum… Read More
Given a string S consisting of N digits, the task is to find the number of distinct Prime Numbers that can be formed using the… Read More
Given an array A[] consisting of N integers and two integers X and Y, the task is to find the maximum sum of the averages… Read More