Ubisoft

  www.ubisoftgroup.com
  www.ubisoftgroup.com

Interview Question

Junior Software Developer Interview

Given numbers 1 to 100 in an array a random number was

  replaced with 0. Find the which number it was in constant time (100).
Answer

Interview Answer

1 Answer

1

easy
add all elements of array and store in a variable n
sum(100)-n is the answer

ABHINAV on Feb 10, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.