1. First find the sum of all given elements.: sum
2. find the sum of elements in the given range. : sum_1
3. Find the duplicates.: d
4. Missing Number: sum-sum_1+d.

http://codepad.org/77Nr9Hay

<http://codepad.org/77Nr9Hay>

On Wed, Sep 1, 2010 at 9:50 AM, Raj Jagvanshi <raj.jagvan...@gmail.com>wrote:

> in ur algo i confuse in solving eqn
>
>
> On Wed, Sep 1, 2010 at 6:31 PM, Dave <dave_and_da...@juno.com> wrote:
>
>> @Raj: Best what?
>>
>> Dave
>>
>> On Sep 1, 12:08 am, Raj Jagvanshi <raj.jagvan...@gmail.com> wrote:
>> > Thanks Dave
>> > but i want best
>> >
>> >
>> >
>> > On Wed, Sep 1, 2010 at 7:14 AM, Dave <dave_and_da...@juno.com> wrote:
>> > > Suppose that x is duplicated and y is omitted. Then the sum of the
>> > > numbers would be 5050 + x - y. Similarly, the sums of the squares of
>> > > the numbers would be 338,350 + x^2 - y^2. Calculate the sum and sum of
>> > > squares of the numbers and solve the resulting equations for x and y.
>> >
>> > > Dave
>> >
>> > > On Aug 31, 1:57 pm, Raj Jagvanshi <raj.jagvan...@gmail.com> wrote:
>> > > >   There is an array having distinct 100 elements from 1 to 100
>> > > >  but by mistake some no is duplicated and a no is missed.
>> > > >  Find the duplicate no and missing no.
>> >
>> > > > Thanks
>> > > > Raj Jagvanshi
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> Groups
>> > > "Algorithm Geeks" group.
>> > > To post to this group, send email to algoge...@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
>> <algogeeks%2bunsubscr...@googlegroups­.com>
>> > > .
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/algogeeks?hl=en.- Hide quoted text -
>> >
>> > - Show quoted text -
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algoge...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@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