# Category Archives: Algorithms

Given two arrays arr[] containing N integers and a mask[] of an odd size. The task is to replace every array element with the value… Read More
Given an integer capacity the maximum number of the processes handled by a CPU at any given time and a 2-D array request[][] is given,… Read More
Given an array arr[] of positive numbers. The task is to check if there exists any subset of any size such that after multiplying each… Read More
Given a binary string str. The task is to find the size of the set(contains unique substrings) of substrings such that if there is a… Read More
Given an array of positive integer arr[], and a number K. the task is to maximize the sum of the array by replacing any K… Read More
Given an integer N and three N x N matrices X[][], Y[][], and Z[][], the task is to calculate the minimum cost required to reach… Read More
Given an array arr[] of N positive numbers and an integer M. The task is to maximize the value of M by adding array elements… Read More
Given an array arr[] of size N and an integer K, the task is to find all the indices in the given array having at… Read More
Given two points P1(x1, y1) and P2(x2, y2) of a matrix, the task is to find the minimum cost to reach P2 from P1 when:… Read More
Given a matrix of dimension N*M, the task is to maximize the total number of occupied cells in the given matrix such that they follow… Read More
A signed integer is an integer with a positive ‘+’ or negative sign ‘-‘ associated with it. Since the computer only understands binary, it is… Read More
Given a positive integer n, the task is to find the sum of series  8/10 + 8/100 + 8/1000 + 8/10000. . . till Nth… Read More
A pair is a container that stores two values mapped to each other, and a vector containing multiple numbers of such pairs is called a… Read More
Given that Concentric circle of radii 1,2,3,4……….N cm are drawn. The interior of the smallest circle is colored white and angular regions are colored alternately… Read More
Given an array arr[] of length N (1≤ arr[i] ≤ N) and an integer K. The task is to find the largest median of any… Read More