## Number of ways of writing N as a sum of 4 squares

Given a number N, the task is to find the number of ways of writing N as a sum of 4 squares. Two representations are… Read More »

- Make all numbers of an array equal
- Reach the numbers by making jumps of two given lengths
- Sum of XOR of all subarrays
- Check if a number is perfect square without finding square root
- Nth number whose sum of digit is multiple of 10
- Count pairs in array whose sum is divisible by K
- Puzzle | Neighbors in a round table
- Minimum operations required to make all the array elements equal
- Find K Closest Points to the Origin
- Generate all rotations of a number
- A Sum Array Puzzle
- Check if it is possible to reach a number by making jumps of two given length
- Count of pairs (x, y) in an array such that x < y
- Distribute N candies among K people
- Find the number in a range having maximum product of the digits
- Count rotations of N which are Odd and Even
- Given two arrays count all pairs whose sum is an odd number
- Sum of all Submatrices of a Given Matrix
- New Algorithm to Generate Prime Numbers from 1 to Nth Number
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Number of array elements derivable from D after performing certain operations
- Minimum number of sets with numbers less than Y
- Midpoint ellipse drawing algorithm
- Sum of bitwise AND of all subarrays
- Sum of the series 1^1 + 2^2 + 3^3 + ..... + n^n using recursion
- Remove characters from a numeric string such that string becomes divisible by 8
- Represent n as the sum of exactly k powers of two | Set 2
- Count of all possible values of X such that A % X = B
- Find the value of ln(N!) using Recursion
- Find sub-arrays from given two arrays such that they have equal sum

Given a number N, the task is to find the number of ways of writing N as a sum of 4 squares. Two representations are… Read More »

Given an integer N, the task is to find the Nth Mosaic number. A Mosaic number can be expressed as follows: If N = Aa… Read More »

Given an integer N, the task is to print the first N terms of the Lower Wythoff sequence. Examples: Input: N = 5 Output: 1,… Read More »

Given an array arr[] of N integers, the task is to find the minimum deletions required to make the GCD of the resulting array elements… Read More »

Given an integer X, the task is to find an optimal set of weights {w1, w2, w3, …, wn} such that we can weigh/determine all… Read More »

There are N boys which are to be seated around a round table. The task is to find the number of ways in which N… Read More »

Given an array arr[] of N elements, you have to perform the following operation on the given array until the array is reduced to a… Read More »

Given two numbers N and K . The task is to find N’th smallest number that is divided by 100 exactly K times. Examples: Input… Read More »

Given N-sided polygon we need to find the total number of triangles formed by joining the vertices of the given polygon with exactly two sides… Read More »

Given an array of size N. The task to find the maximum possible number of elements divisible by 3 that are in the array after… Read More »

Given an array arr[] of N elements and an integer K, the task is to generate an B[] with the following rules: Copy elements arr[1…N],… Read More »

Given N-sided polygon we need to find the number of triangles formed by joining the vertices of the given polygon with exactly one side being… Read More »

Given an array arr[] and an integer K, the task is to count the pairs whose sum of set bits is K Examples: Input: arr[]… Read More »

Given n dices each with m faces, numbered from 1 to m, find the number of ways to get a given sum X. X is… Read More »

Given a positive integer N, the task is to print the Lower Hessenberg matrix of order N which includes any one-digit random positive integer as… Read More »