# Category Archives: Mathematical

Given a number N without leading 0s, the task is to find the maximum number formed after replacing any two adjacent digits by their sum… Read More
Given two positive integers num1 and num2, the task is to find the product of the two numbers on a 12-hour clock rather than a… Read More
Given an integer N, the task is to find all the factors (excluding itself) of the number N and their XOR. Examples: Input: N =… Read More
Given an array arr[] of N positive integers. The task is to find the minimum number of operations required to make the array containing alternating… Read More
Given an integer N (N ≥ 3), two distinct numbers X and Y, the task is to find the maximum number of possible ways by… Read More
Given two positive integers Num1 and Num2, the task is to find the remainder when Num1 is divided by Num2. Examples: Input:  Num1 = 11,… Read More
Given an array A[] of size N, and two integers K and C, the task is to check if all the elements of the array… Read More
Given an array, A[] (1 – indexed) of size ‘N’ which contains a permutation of [1, N], the task is to find the minimum number… Read More
Given a positive integer N. The task is to print the array in decreasing order in which the numbers are odd powers of 2  and… Read More
Given two Integers N and X in which N is the total number of elements of the series that starts with X (say A). The… Read More
Given a 4-digit number with at least two distinct digits, Your program should perform the following operations on the number:  Arrange the digits in descending… Read More
Given an array A[] of size N, the task is to find the total number of positions in all the subarrays such that the value… Read More
Given a binary string S, the task is to count the substrings having the number of 0s and 1s in the ratio of X :… Read More
Given two arrays A[] and B[] of length N and M respectively and a prime number X, the task is to find the number of… Read More
Given an array A[] of size N, and an integer X, the following operation can be performed on that array: Choose any element, say Y… Read More