# Tag Archives: Numbers

## Check if a given number is factorial of any number

Given a number n, the task is to determine whether n can be a factorial of some number x Examples: Input: N = 24 Output:… Read More »

## Compare numbers represented by Linked Lists

Given the pointers to the head nodes of two linked lists. The task is to compare the numbers represented by the linked lists. The numbers… 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 »

## Program to toggle K-th bit of a number N

Given a number N, the task is to clear the K-th bit of this number N. If K-th bit is 0, then set it to… Read More »

## Program to clear K-th bit of a number N

Given a number N, the task is to clear the K-th bit of this number N. If K-th bit is 1, then clear it to… Read More »

## Minimum number of moves to reach N starting from (1, 1)

Given an integer N and an infinite table where ith row and jth column contains the value i *j. The task is to find the… Read More »

## Check whether the given floating point number is a palindrome

Given a floating point number N, the task is to check whether it is palindrome or not. Input: N = 123.321 Output: Yes Input: N… Read More »

## Check whether the given integers a, b, c and d are in proportion

Given four integers a, b, c and d. The task is to check whether it is possible to pair them up such that they are… Read More »

## Find the previous fibonacci number

Given a Fibonacci number N, the task is to find the previous Fibonacci number. Examples: Input: N = 8 Output: 5 5 is the previous… Read More »

## Represent the given number as the sum of two composite numbers

Given an integer N, the task is to represent N as the sum of two composite integers. There can be multiple ways possible, print any… Read More »

## Count of N-bit binary numbers without leading zeros

Given an integer N, the task is to find the count of N-bit binary numbers without leading zeros. Examples: Input: N = 2 Output: 2… Read More »

## Sum of all the numbers present at given level in Pascal’s triangle

Given a level L. The task is to find the sum of all the integers present at the given level in Pascal’s triangle . A… Read More »

## Program to find Nth odd Fibonacci Number

Given an integer N. The task is to find the Nth odd Fibonacci number. The odd number fibonacci series is as: 1, 1, 3, 5,… Read More »

## Random list of M non-negative integers whose sum is N

Given two integers M and N, the task is to create a list of M non-negative integers whose sum is N. In case when more… Read More »

## Convert N to M with given operations using dynamic programming

Given two integers N and M and the task is to convert N to M with the following operations: Multiply N by 2 i.e. N… Read More »