## Sum of distances between the two nearest perfect squares to all the nodes of the given linked list

Given a linked list, the task is to find the sum of distances between the two nearest perfect squares for all the nodes of the… Read More »

## Count number of 1s in the array after N moves

Given an array of size N in which initially all the elements are 0(zero). The task is to count the number of 1’s in the… 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 »

## Check if product of array containing prime numbers is a perfect square

Given an array arr[] containing only prime numbers, the task is to check if the product of the array elements is a perfect square or… Read More »

## Smallest and Largest N-digit perfect squares

Given an integer N, the task is to find the smallest and the largest N digit numbers which are also perfect squares. Examples: Input: N… Read More »

## Print n numbers such that their sum is a perfect square

Given an integer n, the task is to print n numbers such that their sum is a perfect square. Examples: Input: n = 3 Output:… Read More »

## Number of elements with even factors in the given range

Given a range [n, m], the task is to find the number of elements that have even number of factors in the given range (n… Read More »

## Smallest perfect square divisible by all elements of an array

Given an array arr[], the task is to find the smallest perfect square which is divisible by all the elements of the given array. Examples:… Read More »

## Check if a number is perfect square without finding square root

We need to check whether a number is a perfect square or not without finding its square root. Examples: Input : n = 36 Output… Read More »

## Count numbers upto N which are both perfect square and perfect cube

Given a number N. The task is to count total numbers under N which are both perfect square and cube of some integers. Examples: Input:… Read More »

## Closest perfect square and its distance

Given a positive integer . The task is to find the perfect square number closest to N and steps required to reach this number from… Read More »

## Check if the sum of perfect squares in an array is divisible by x

Given an array arr[] and an integer x, the task is to check whether the sum of all the perfect squares from the array is… Read More »

## Largest Divisor of a Number not divisible by a perfect square

Given a positive integer N. Find the largest divisor of the given number that is not divisible by a perfect square greater than 1. Examples:… Read More »

## Count number of triplets (a, b, c) such that a^2 + b^2 = c^2 and 1 <= a <= b <= c <= n

Given an integer N, the task is to count the number of triplets (a, b, c) such that a2 + b2 = c2 and 1… Read More »

## Count of pairs in an array whose sum is a perfect square

Given an array of distinct elements, the task is to find the total number of two element pairs from the array whose sum is a… Read More »