Citrix Interview Question: To find lcm of N numbers ? ... | Glassdoor

Interview Question

Software Development Engineer Interview(Student Candidate) Bengaluru (India)

To find lcm of N numbers ?

logic, recursive algorithm, graphs, sorting algorithm

Interview Answer

1 Answer


heap sort numbers + Calculate gcd of 2 (biggest and smallest for optimization) numbers by eulers method + lcm = axb /gcd + do this recursively in a tree fashion ..root will be the lcm of numbers

Interview Candidate on May 7, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.