## Maximum possible remainder when an element is divided by other element in the array

Given an array arr[] of N integers, the task is to find the maximum mod value for any pair (arr[i], arr[j]) from the array. Examples:… Read More »

## Check whether the given decoded string is divisible by 6

Given a string str consisting of lowercase characters, the task is to check whether the string is divisible by 6 after changing it according to… Read More »

## Check the divisibility of Hexadecimal numbers

Given a string S consisting of a large hexadecimal number, the task is to check its divisibility by a given decimal number M. If divisible… Read More »

## Count of elements on the left which are divisible by current element

Given an array A[] of N integers, the task is to generate an array B[] such that B[i] contains the count of indices j in… Read More »

## Check if the number formed by the last digits of N numbers is divisible by 10 or not

Given an array arr[] of size N consisting of non-zero positive integers. The task is to determine whether the number that is formed by selecting… Read More »

## Check whether a large number represented as array is divisible by Y

Given a large integer X represented as an array arr[] where each arr[i] stores a digit in X. The task is to check whether the… Read More »

## Maximum possible elements which are divisible by 2

Given an integer array arr of size N. The task is to find the maximum possible elements in the array which are divisible by 2… Read More »

## Minimum number of operations on a binary string such that it gives 10^A as remainder when divided by 10^B

Given a binary string str of length N and two integers A and B such that 0 ≤ A < B < n. The task… Read More »

## Highest power of 2 that divides a number represented in binary

Given a binary string str, the task is to find the largest power of 2 that divides the decimal equivalent of the given binary number.… Read More »

## Predict the winner in Coin Game

There are two players P1 and P2 and two piles of coins consisting of M and N coins respectively. At each turn, a player can… Read More »

## Highest power of a number that divides other number

Given two numbers N and M, the task is to find the highest power of M that divides N. Note: M > 1 Examples: Input:… Read More »

## Smallest N digit number which is a multiple of 5

Given an integer N ≥ 1, the task is to find the smallest N digit number which is a multiple of 5. Examples: Input: N… Read More »

## Check if product of first N natural numbers is divisible by their sum

Given an integer N, the task is to check whether the product of first N natural numbers is divisible by the sum of first N… Read More »

## Number of times the largest perfect square number can be subtracted from N

Given a number N. At every step, subtract the largest perfect square( ≤ N) from N. Repeat this step while N > 0. The task… Read More »

## Predict the winner of the game on the basis of absolute difference of sum by selecting numbers

Given an array of N numbers. Two players X and Y play a game where at every step one player selects a number. One number… Read More »