Friday, August 15, 2008

101 List

You have an array of 101 elements.
The array contains the numbers 1,2,3,4,5,...,100 but it is not in order.
ONE of those numbers is repeated in this array (which explains the 101th element).
Your job is to determine what number is repeated with only ONE traversal of the array.

How will you do this?

2 comments:

  1. lawl lawl lawl
    find the total sum of numbers 1-100 then subtract it from the total of the entire arrray and gg!

    ReplyDelete