Skip to content

Numbers

Mission Peace edited this page Oct 12, 2016 · 2 revisions
  1. Given a large number tell where it is an aggregate number or not - AggregateNumber.java
  2. Given an array of sorted numbers, tell if there are 3 numbers which form arithmetic progression - ArithemeticProgressionExists.java
  3. Given two numbers in form of an array, multiply them - ArrayMultiplication.java
  4. Given a number n and k, find binomial coefficient of n to k - BinomialCoefficient.java
  5. Covert a decimal number into any other base N < 10 - ConvertToBaseN.java
  6. Given a number n, find counts of 2 from 1 to n - CountNoOf2s.java
  7. Given a number n, find number of numbers which does not have digit 4 in them - CountNumbersNotIncluding4.java
  8. Given a dividend and a divisor, return remainder and quotient - DivisionWithoutDivisionOperator.java
  9. Given two numbers find their GCD(greatest common divisor) - EuclideanAlgoForGCD.java
  10. Given an array of numbers, generate a signature where D represent decrease and I represents increase. Now given Ds and Is generate pattern of number - GenerateSignature.java
  11. Given an array, find elements combining which forms largest multiple of 3 - https://github.com/mission-peace/interview/blob/master/src/com/interview/number/LargestMultipleOf3inArray.java
  12. Given a number n, tell if this number is a lucky number - LuckyNumbers.java
  13. Given an array of 3 numbers, find their median - https://github.com/mission-peace/interview/blob/master/src/com/interview/number/MedianOf3Number.java
  14. Write a program to determine whether n/2 distinctinctive pairs can be formed from given n integers where n is even and each pair's sum is divisible by given k - NBy2PairSumToK.java
  15. Given an array representing a number, find next larger palindrome which can be formed - NextLargestPalindrome.java
  16. Given a chinese number which never has 4, convert it into decimal format - NotIncluding4.java
  17. Given an array representing a number, return a new array consisting of same numbers but larger than this number - PermutationBiggerThanNumber.java
  18. Given two arrays representing numbers, convert first array into number which is next larger than second array - PermutationLargerThanGivenArray.java
  19. Calculate power function using divide and conquer - PowerFunction.java
  20. Given an array of numbers, arrange them in a way that yields the largest value - RearrangeNumberInArrayToFormLargestNumber.java
  21. Russian peasant multiplication - RussianPeasantMultiplication.java
  22. Smallest number greater than given number but all digits in increasing order - SmallestNumberGreaterThanGiveNumberIncreasingSequence.java
  23. Calculate square root of a number without using any library - SquareRoot.java
  24. Given a positive integer n, generate all possible unique ways to represent n as sum of positive integers -https://github.com/mission-peace/interview/blob/master/src/com/interview/number/UniquePartitionOfInteger.java
  25. A man is walking up a set of stairs. He can either take 1 or 2 steps at a time. Given n number of steps,find out how many combinations of steps he can take to reach the top of the stairs - NumberOfCombinationsForStairs.java
  26. Given a number, find number of trailing zeros in the factorial of this number - Trailing0sinFactorial.java
  27. Factorial of a large number - FactorialOfLargeNumber
  28. Find mth number in array of [1..n] where m is defined by lexicographically order - MthNumberInNSizeArray.java
  29. Apply +, -, /, * on given string - BasicCalculator.java
Clone this wiki locally