number-theory

Find b that (a+b) divisible to K

Find b that (a+b) divisible to K Question: I have integer input: 0 < a, K, N < 10^9 I need to find all b numbers that satisfy: a + b <= N (a + b) % K = 0 For example: 10 6 40 -> [2, 8, 14, 20, 26] I tried a simple …

Total answers: 3

Given a string of a million numbers, return all repeating 3 digit numbers

Given a string of a million numbers, return all repeating 3 digit numbers Question: I had an interview with a hedge fund company in New York a few months ago and unfortunately, I did not get the internship offer as a data/software engineer. (They also asked the solution to be in Python.) I pretty much …

Total answers: 13