Skip to content

Category Archives: Algorithms

Given an array of size N. Consider all the subarrays starting at each index from [0, N – 1]. Determine the length of the smallest… Read More
Given the number of pages in N different books and M students. Every student is assigned to read some books that can be consecutive or… Read More
Given an integer N denoting the size of an array and two arrays containing Bitwise AND and Bitwise OR of adjacent elements of the array… Read More
Given a target string S consisting of lowercase alphabets, the task is to make this string by performing some operation on an empty string such… Read More
Given an array Arr[] of N integers and an integer K, the task is to find if it is possible to make the count of… Read More
Given an array A[] of positive integers, print all the unique non-empty subsets of the array  Note: The set can not contain duplicate elements, so… Read More
Given two integers X and Y, and an integer K, the task is to find the minimum number of operations to make X equal to… Read More
Given an array of integers arr[], the task is to find the maximum number of the indices having values greater than the sum of the neighbours… Read More
Given a binary array A[] of size N, the task is to find the minimum number of subarrays that need to be reversed to sort… Read More
Given two numbers M and N denoting the number of rows and columns of a matrix A[] where A[i][j] is the sum of i and… Read More
Given an integer N (N > 2), the task is to generate a binary string of size N that consists of equal numbers of “10”… Read More
Given an array arr[] of N integers. the task is to find the minimum number of operations required to make all the elements of the… Read More
Given a number N and a digit K, The task is to count N digit numbers with at least one digit as K. Examples: Input:… Read More
Given an array arr[] of size N, the task is to find the last element remaining after removing all elements closest to sum/2 sequentially where… Read More
Consider a series of buildings in a 2-D square plot with different heights and only those buildings are chargeable that have a clear and straight… Read More

Start Your Coding Journey Now!