## Smallest number greater than or equal to N divisible by K

Given a number N and a number K, the task is to find the smallest number greater than or equal to N which is divisible… Read More »

## Largest number smaller than or equal to N divisible by K

Given a number N and a number K, the task is to find the largest number smaller than or equal to N which is divisible… Read More »

## Check if any permutation of a number is divisible by 3 and is Palindromic

Given an integer . The task is to check whether any of its permutations is a palindrome and divisible by 3 or not. Examples :… Read More »

## N digit numbers divisible by 5 formed from the M digits

Given M unique digits and a number N. The task is to find the number of N-digit numbers which can be formed from the given… Read More »

## Minimum number of operations required to delete all elements of the array

Given an integer array arr, the task is to print the minimum number of operations required to delete all elements of the array. In an… Read More »

## Check whether product of digits at even places of a number is divisible by K

Given a number N, the task is to check whether the product of digits at even places of a number is divisible by K. If… Read More »

## Minimum number of operations required to reduce N to 1

Given an integer element ‘N’, the task is to find the minimum number of operations that need to be performed to make ‘N’ equal to… Read More »

## Check whether sum of digits at odd places of a number is divisible by K

Given two integer ‘N’ and ‘K’, the task is to find the sum of digits of ‘N’ at it’s odd places (right to left) and… Read More »

## Longest subarray with elements divisible by k

Suppose you a given an array. You have to find the length of the longest subarray such that each and every element of it is… Read More »

## Sum of greatest odd divisor of numbers in given range

Given an interval of integers [A, B]. For each number in this interval compute its greatest odd divisor. Output the sum of these divisors. Examples:… Read More »

## Round to next greater multiple of 8

Given an unsigned integer x. Round it up to the next greater multiple of 8 using bitwise operations only. Examples: Input : 35 Output :… Read More »

## Round to next smaller multiple of 8

Given an unsigned integer x. Round it down to the next smaller multiple of 8 using bitwise operations only. Examples: Input : 35 Output :… Read More »

## Program to find count of numbers having odd number of divisors in given range

Given two integers A and B. The task is to count how many numbers in the interval [ A, B ] have an odd number… Read More »

## Check if there is any pair in a given range with GCD is divisible by k

Given a range, we need to check if is their any pairs in the segment whose GCD is divisible by k. Examples: Input : l=4,… Read More »

## Program to find Nth term divisible by a or b

Given two integers and . The task is to find the Nth term which is divisible by either of or . Examples : Input :… Read More »