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

Given an array of items, an i-th index element denotes the item id’s and given a number m, the task is to remove m elements… Read More »

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 4, 2017

Given an array, write a program to add the minimum number(should be greater than 0) to the array so that the sum of array becomes… Read More »

August 3, 2017

A number N is given. We need to print its ‘K’th Least Significant Bit. Examples: Input : num = 10, k = 4 Output :… Read More »

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 »

Following are not allowed to use 1) Comparison Operators 2) String functions Examples: Input : num1 = 1233, num2 – 1233 Output : Same Input… Read More »

August 1, 2017

You are given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to set all bits between i… Read More »

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 positive number you need to check whether it’s complement and the number are anagrams or not. Examples: Input : a = 4294967295 Output… Read More »

Given an alphanumeric string, find the number of times a pattern 1(0+)1 occurs in the given string. Here, (0+) signifies the presence of non empty… Read More »

Previous article of this segment dealt with sorting list of dictionaries by values using lambda function. Ways to sort list of dictionaries by values in… Read More »