## Check if N can be represented as sum of integers chosen from set {A, B}

Given three integers N, A and B, the task is to find whether N can be represented as sum of A’s and B’s. Examples: Input:… Read More »

## Number of pairs with Bitwise OR as Odd number

Given an array A[] of size N. The task is to find the how many pair(i, j) exists such that A[i] OR A[j] is odd.… Read More »

## Partiton N into M parts such that difference between Max and Min part is smallest

Given two integers N and M, partiton N into M integers such that the difference between the maximum and minimum integer obtained by the partition… Read More »

## Count pairs with Bitwise-AND as even number

Given an array of integers. The task is to find the number of pairs (i, j) such that A[i] & A[j] is even. Examples: Input:… Read More »

## Split N^2 numbers into N groups of equal sum

Given an even number N. The task is to consider numbers from 1 to N2, split them into N groups of the equal sum. Examples:… Read More »

## Count pieces of circle after N cuts

Given an integer N, where . The task is to print the count of pieces of a circle with N cuts where each cut passes… Read More »

## Count subarrays consisting of only 0’s and only 1’s in a binary array

Given a binary array consisting of only zeroes and ones. The task is to find: The number of subarrays which has only 1 in it.… Read More »

## Number of words in a camelcase sequence

CamelCase is the sequence of one or more than one words having the following properties: It is a concatenation of one or more words consisting… Read More »

## Reconstruct the array by replacing arr[i] with (arr[i-1]+1) % M

Given an array of N elements and an integer M. Now, the array is modified by replacing some of the array elements with -1. The… Read More »

## Represent a number as a sum of maximum possible number of Prime Numbers

Given a positive integer . The task is to represent it as a sum of the maximum possible number of prime numbers. (N > 1)… Read More »

## Maximize number of nodes which are not part of any edge in a Graph

Given a graph with n nodes and m edges. Find the maximum possible number of nodes which are not part of any edge (m will… Read More »

## Number of solutions for x < y, where a <= x <= b and c <= y <= d and x, y are integers

Given four integers a, b, c, d ( upto 10^6 ). The task is to Find the number of solutions for x < y, where… Read More »

## Divide an isosceles triangle in two parts with ratio of areas as n:m

Given the height of an isosceles triangle and two integers , . The task is to find the height from top of the triangle such… Read More »

## Count Numbers with N digits which consists of odd number of 0’s

We are given a number N. The task is to find the count of numbers which have N digits and odd number of zeroes. Note:… Read More »

## Find other two sides and angles of a right angle triangle

Given one side of right angle triangle, check if there exists a right angle triangle possible with any other two sides of the triangle. If… Read More »