InterviewDB
Question
Divisible Number: Find the Smallest Integer Greater Than N Divisible by All Given Factors
phone
Question Details
Problem Given an integer n and a list of integers factors, find the smallest integer strictly greater than n that is divisible by every element in factors. Follow-ups How do you compute the LCM of a list of numbers? Walk through the GCD-based approach. What is the time complexity of your solution and what are the edge cases (e.g., factors contains 1, or factors contains duplicates)? What if n can be up to 10^18? Does your integer arithmetic still work in Python? In Java/C++? Generalize: find the…
Full Details
🔒
Unlock all Hudson River Trading questions
Full insider details, leaked discussions, and candidate experiences.
Get full access — $100 a year, unlimited accessAbout This Question
This is a reported interview question from a hudson river trading interview during the phone round.