## Square root of a number by Repeated Subtraction method

Given an integer N, the task is to find its perfect square root by repeated subtraction only. Examples: Input: N = 25 Output: 5 Input:… Read More »

- Check whether a number can be represented as difference of two squares
- Count of subarrays having exactly K perfect square numbers
- Check if a given number is a Perfect square using Binary Search
- Floor square root without using sqrt() function : Recursive
- Find two numbers such that difference of their squares equal to N
- Count of subarrays whose sum is a perfect square
- Count of interesting primes upto N
- Sunny Number
- Find sum of product of every number and its frequency in given range
- Count of perfect squares of given length
- Array range queries to find the number of perfect square elements with updates
- Count elements in an Array that can be represented as difference of two perfect squares
- Construct an Array such that cube sum of all element is a perfect square
- Sum of all Perfect Squares lying in the range [L, R] for Q queries
- Count of pairs in an array whose product is a perfect square
- Count of pairs of integers whose difference of squares is equal to N
- Construct an Array of size N whose sum of cube of all elements is a perfect square
- Check if N can be represented as sum of squares of two consecutive integers
- Probability of getting a perfect square when a random number is chosen in a given range
- Check whether the number can be made perfect square after adding K
- Find the Largest N digit perfect square number in Base B
- Previous perfect square and cube number smaller than number N
- Subsets of size K with product equal to difference of two perfect squares
- Sum of all perfect square divisors of numbers from 1 to N
- Least number to be added to or subtracted from N to make it a Perfect Square
- Largest N digit Octal number which is a Perfect square
- Sum of alternating sign Squares of first N natural numbers

Given an integer N, the task is to find its perfect square root by repeated subtraction only. Examples: Input: N = 25 Output: 5 Input:… Read More »

Given a number N, the task is to find the number of quadraples such that a2 + b2 = c2 + d2 where (1 <=… Read More »

Given an array arr[] of N positive integers and the number of queries Q, each query contains two numbers L and R. The task is… Read More »

Given an array arr[] containing positive integers, the task is to find the minimum number of operations to be done on the array to make… Read More »

Given an integer N, the task is to find the smallest number whose sum of digits is N2.Examples: Input: N = 4 Output: 79 24 = 16 sum… Read More »

Given an integer N, the task is to check N is a Sastry number. A number N is a Sastry Number if N concatenated with… Read More »

Given an array arr[] of integers and an array of queries, the task is to find the sum of product of every number and its… Read More »

Given a positive integer N, the task is to find the count of pairs of integers (x, y) whose difference of squares is equal to… Read More »

Given an array arr[], the task is to count the number of elements in the array that can be represented as in the form of… Read More »

Given an integer N, the task is to find two non-negative integers A and B, such that A2 – B2 = N. If no such… Read More »

Given a distinct integers array arr[] of size N and an integer K, the task is to count the number of subsets of size K… Read More »

Given a number N, the task is to find the sum of all the perfect square divisors of numbers from 1 to N. Examples: Input:… Read More »

Given the size of array N, the task is to construct an array of size N with positive integer elements such that the cube sum… Read More »

Given an array arr[] with positive and negative elements, the task is to count all subarrays whose sum is a perfect square. Examples: Input: arr[]… Read More »

Given an integer N, the tasks is to construct a sorted array arr[] of size N, such that the sum of cube of all elements… Read More »