##
Find minimum sum of factors of number
August 8, 2017

Given a number, find minimum sum of its factors. Examples: Input : 12 Output : 7 Explanation: Following are different ways to factorize 12 and… Read More »

August 8, 2017

Given a number, find minimum sum of its factors. Examples: Input : 12 Output : 7 Explanation: Following are different ways to factorize 12 and… Read More »

August 6, 2017

Lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. What minimum lucky number has the sum of… Read More »

A number is said to be twisted prime if it is a prime number and reverse of the number is also a prime number. Examples:… Read More »

Given two numbers, a and b. Compute the average of the two numbers. The well know formula (a + b) / 2 may fail at… Read More »

August 3, 2017

Given an array of n integers. Find minimum number to be inserted in array, so that sum of all elements of array becomes prime. If… Read More »

August 1, 2017

Given a number, write a program to find a maximum number that can be formed using all of the digits of this number. Examples: Input… Read More »

Given a number , write a program to reverse this number using stack. Examples: Input : 365 Output : 563 Input : 6899 Output :… Read More »

July 31, 2017

Given a non-negative number num. The problem is to apply at most one swap operation on the number num so that the resultant is the… Read More »

July 30, 2017

Write a program to check if a given integer is jumbled or not. A number is said to be Jumbled if for every digit, its… Read More »

July 29, 2017

Print all permutations of a string keeping the sequence but changing cases. Examples: Input : ab Output : AB Ab ab aB Input : ABC… Read More »

Write a C program to find sum of all prime numbers between 1 to n. Examples: Input : 10 Output : 17 Explanation : Primes… Read More »

July 28, 2017

Pell numbers are numbers that are similar to the Fibonacci numbers and are generated by below formula Pn = 2*Pn-1 + Pn-2 with seeds P0… Read More »

July 27, 2017

In this post, we’ll discuss Binomial Random Variables. Prerequisite : Random Variables A specific type of discrete random variable that counts how often a particular… Read More »

July 26, 2017

Zeller’s congruence is an algorithm devised by Christian Zeller to calculate the day of the week for any Julian or Gregorian calendar date. It can… Read More »

July 25, 2017

Given a number of the form 11..1 such that number of digits in it is smaller than 10, find square of the number. Examples: Input… Read More »