## Number of submatrices with all 1s

Given a N*N matrix containing only 0s and 1s, the task is to count the number of submatrices containing all 1s. Examples: Input : arr[][]… Read More »

- Program to find the Hidden Number
- Make all numbers of an array equal
- Reach the numbers by making jumps of two given lengths
- Largest palindromic number in an array
- Check if a number is perfect square without finding square root
- Find the unit place digit of sum of N factorials
- Check if a number can be expressed as a^b | Set 2
- Puzzle | Cut Blue Painted Cube
- Sum of the first N Prime numbers
- Minimum operations required to make all the array elements equal
- Sum of minimum elements of all subarrays
- Sum of XOR of all subarrays
- A Sum Array Puzzle
- Generate all rotations of a number
- Check if it is possible to reach a number by making jumps of two given length
- Puzzle | Neighbors in a round table
- Number of array elements derivable from D after performing certain operations
- Program to find minimum number of lectures to attend to maintain 75%
- Find K Closest Points to the Origin
- Minimum number of sets with numbers less than Y
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Check if a number is a Mystery Number
- Sum of the multiples of two numbers below N
- Sum of all Primes in a given range using Sieve of Eratosthenes
- Count of pairs (x, y) in an array such that x < y
- Immediate smallest number after re-arranging the digits of a given number
- Find the Nth term of the series 14, 28, 20, 40,.....
- Find elements of array using XOR of consecutive elements
- Remove characters from a numeric string such that string becomes divisible by 8
- Graph Types and Applications

Given a N*N matrix containing only 0s and 1s, the task is to count the number of submatrices containing all 1s. Examples: Input : arr[][]… Read More »

Given an integer k and a tree with n nodes. The task is to count the number of distinct pairs of vertices which have a… Read More »

Given an N * N matrix and q queries, each containing position of top-left and bottom-right corner of a rectangular sub-matrix, the task is to… Read More »

Given three integers N, K and R. The task is to calculate the sum of all those numbers from 1 to N which yields remainder… Read More »

Given an array which represents y coordinates of a set of points on a coordinate plane, where (i, arr[i]) represent a single point. Find whether… Read More »

Given an array arr[] of N elements, the task is to find the length of the longest sub-sequence in arr[] such that all the elements… Read More »

Given three integers A, B and C, the task is to find the count of values of X such that the following condition is satisfied,… Read More »

Given an array containing N elements, each element is either 1 or 2. The task is to find out whether the array can be divided… Read More »

Given three integers N, D and K. The task is to check whether it is possible to make a tree with exactly N vertices, D… Read More »

Given a NxN 2-D matrix, the task to find the sum of all the submatrices. Examples: Input : arr[] = {{1, 1}, {1, 1}}; Output… Read More »

Given a range [L, R], the task is to find a pair (X, Y) such that L ≤ X < Y ≤ R and X… Read More »

Given an array of n length. The task is to check if the given array can be split into an odd number of sub-segment starting… Read More »

Given an array Arr[] of N integers. The task is to find minimum number of elements needed to be removed from the array, so that… Read More »

Given an integer N, the task is to check whether N the given number can be made a perfect square after adding 1 to it.… Read More »

Given an undirected complete graph of N vertices where N > 2. The task is to find the number of different Hamiltonian cycle of the… Read More »