Given an arr[] of size N and an integer, K, the task is to find the maximum possible value of MEX by adding or subtracting… Read More
Category Archives: Mathematical
Given a positive integer N, the task is to find the largest possible value of N after any number of swaps is made between digits… Read More
Given a matrix of size N * N containing only 0s and 1s, where 0 represents white and 1 represents black. The task is to… Read More
Given an array A[] containing N elements and an array queries containing Q queries of type [ X, L, R ] where X is the… Read More
Given an array nums[] of length N containing non-negative integers, the task is to convert all elements from index 0 to N-2 to zero, after… Read More
Given a positive integer N, the task is to find the number of distinct ways to express N as a sum of positive palindromic integers… Read More
Given three integers X, Y, and Z. the task is to find the minimum distance between any two multiples of the given integers. Note: Common… 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 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 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 integer N, denoting the size of a circle where first N integers are placed in clockwise order such that j and (j+1) are… Read More
Given a permutation arr[] of size N which is unsorted and contains all integers from 1 to N exactly once, the task is to find… Read More
Given two positive integers N and M, the task is to find the number of different GCDs which can be formed by adding an integer… Read More
Given an integer N, the task is to find the minimum and the maximum number of terms required to divide N as the sum of… Read More
Given an array arr[] of size N, the task is to check if for all distinct triplets of indices i, j, k, [ 0 ≤… Read More