Re:Hiring the Smartest People in the World
by alexchamberlain on Wednesday May 02, 2012 @06:02AM
(#3918289)
Sorry, can you expand on what you meant by that?
[ Parent
| on HN ]
Sum of first n natural numbers is n(n+1)/2. The sum of the array, represented by s, is n(n+1)/2 - x + y (subtract x - the missing number and add y - the duplicated number) gives:
1: n(n+1)/2 - x + y = s
Product of first n natural numbers is represented as: n! The product of the numbers in array is p.
2: p x / y = n!
(multiply by x - add missing number to product and divide by y - remove duplicated number from product).