Skip to content

Category Archives: Algorithms

Given a binary matrix arr[][] having N rows and M columns, the task is to calculate the minimum number of operations required to set the… Read More
Given an integer N, the task is to calculate the maximum number of times N can be divided by an integer K, where K is… Read More
Given a binary integer N, the task is to convert it into base 6. Note: The number of bits in N is up to 100. … Read More
Given two integers A and B, the task is to find a triplet (X, Y, Z) such that all of them are divisible by A,… Read More
Given string str having N characters representing an integer, the task is to calculate the sum of all possible prefixes of the given string. Example:… Read More
Given an array arr[] of N intervals, the task is to calculate the index of the closest interval to the right of each of the… Read More
Given an array arr[] of size N and a positive integer K, the task is to maximise difference between the largest element and the smallest… Read More
Given an array arr[]. The task is to minimize the number of operations required to make all the elements in arr[] equal. It is allowed… Read More
Given three binary strings a, b, and c each having 2*N characters each, the task is to find a string having almost 3*N characters such… Read More
Given two strings A and B each of length N and an integer K, the task is to find if string A can be converted… Read More
Given a matrix grid[][] of size M * N where each cell of the matrix denotes the cost to be present on that cell. The… Read More
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

Start Your Coding Journey Now!