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?
Friday, August 15, 2008
Subscribe to:
Post Comments (Atom)
wtf, invite me to your blog lol
ReplyDeletelawl lawl lawl
ReplyDeletefind the total sum of numbers 1-100 then subtract it from the total of the entire arrray and gg!