## Largest number in an array that is not a perfect cube

Given an array of n integers. The task is to find the largest number which is not a perfect cube. Print -1 if there is… Read More »

## Largest right circular cylinder that can be inscribed within a cone

Given a right circular cylinder which is inscribed in a cone of height h and base radius r. The task is to find the largest… Read More »

## Sum of all even numbers in range L and R

Given two integers L and R, the task is to find the sum of all even numbers in range L and R. Examples: Input: L… Read More »

## Ratio of area of a rectangle with the rectangle inscribed in it

Given two rectangles, X with a ratio of length to width a:b and Y with a ratio of length to width c:d respectively. Both the… Read More »

## 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 »

## Check if N is divisible by a number which is composed of the digits from the set {A, B}

Given three integers N, A and B, the task is to find whether N is divisible by any number that contains only A and B… Read More »

## Minimum number of increment/decrement operations such that array contains all elements from 1 to N

Given an array of N elements, the task is to convert it into a permutation (Each number from 1 to N occurs exactly once) by… Read More »

## Lexicographically smallest substring with maximum occurrences containing a’s and b’s only

Given a string ( containing characters from ‘0’ to ‘9’) and two digits and . The task is to find the substring in the given… 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 »

## Minimum number of moves required to reach the destination by the king in a chess board

Given four integers sourceX, sourceY, destinationX and destinationY which represent the source and destination coordinates on a chessboard. The task is to find the minimum… Read More »

## Volume of biggest sphere within a right circular cylinder

Given a right circular cylinder of radius and height . The task is to find the radius of the biggest sphere that can be inscribed… Read More »

## Volume of largest right circular cylinder within a Sphere

Given a sphere of radius . The task is to find volume of the biggest right circular cylinder that can be inscribed within it. Examples:… Read More »

## Longest rod that can be inserted within a right circular cylinder

Given a right circular cylinder of height , & radius . The task is to find the length of the longest rod that can be… Read More »

## Program to print ‘N’ alphabet using the number pattern from 1 to n

Given an integer N, the task is to print the Alphabet N Pattern as given below: 1 1 2 2 2 3 3 3 *… 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 »