##
Find maximum possible stolen value from houses
June 27, 2017

There are n houses build in a line, each of which contains some value in it. A thief is going to steal the maximal value… Read More »

June 27, 2017

There are n houses build in a line, each of which contains some value in it. A thief is going to steal the maximal value… Read More »

Given an integer n > 0, which denotes the number of digits, the task to find total number of n-digit positive integers which are non-decreasing… Read More »

June 26, 2017

The numbers that can be arranged to form a rectangle are called Rectangular Numbers ( also known as Pronic numbers). The first few rectangular numbers… Read More »

We have to rotate an object by a given angle about a given pivot point and print the new co-ordinates. Examples: Input : {(100, 100),… Read More »

Given a function f(x) on floating number x and three initial distinct guesses for root of the function, find the root of function. Here, f(x)… Read More »

You are given an n-digit large number, you have to check whether it is divisible by 999 without dividing or finding modulo of number by… Read More »

A Krishnamurthy number is a number whose sum of the factorial of digits is equal to the number itself. For example 145, sum of factorial… Read More »

Euler Totient Function (ETF) Φ(n) for an input n is count of numbers in {1, 2, 3, …, n} that are relatively prime to n,… Read More »

June 25, 2017

Given two points P and Q in the coordinate plane, find the equation of the line passing through both the points. This kind of conversion… Read More »

The Selection Sort algorithm sorts maintains two parts. First part that is already sorted Second part that is yet to be sorted. The algorithm works… Read More »

Consider a rectangle ABCD, we’re given the co-ordinates of the mid points of side AD and BC (p and q respectively) along with their length… Read More »

Given length of wall w and shelves of two lengths m and n, find the number of each type of shelf to be used and… Read More »

June 24, 2017

Given a fence with n posts and k colors, find out the number of ways of painting the fence such that at most 2 adjacent… Read More »

Given n > 3, find number of diagonals in n sided convex polygon. According to Wikipedia, In geometry, a diagonal is a line segment joining… Read More »

Given a number ‘n’, we need to find the nth number whose each digit is a prime number i.e 2, 3, 5, 7….In other words… Read More »