no. are from 1 to 99 , by sum of n numbers formula we ve
sum(99)= (99*998)/2

but here we have an array a[100] with a repeated element.Sum of the numbers
in this array is
for(i=1;i<100;i++)
{
  sum1+=a[i];
}
  repeated element = sum(99)-sum1;

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to