Microsoft

  www.microsoft.com
  www.microsoft.com

Interview Question

Software Development Engineer In Test (SDET) Interview(Student Candidate)

Given a range of numbers ordered from 1 to 1 million, what

  is the most efficient method to find a number that is missing within the range.
Answer

Interview Answer

1 Answer

2

Sum up all of the numbers from 1 to 1 million and subtract the sum from the sum of the range of numbers given in the problem to find the missing number.

Interview Candidate on Apr 26, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.