take the sum of array and product.
if they were present then sum will be n(n-1)/2 and product will be n!.
make two eq of a+b and a-b with these values and get the num

On Thu, Aug 12, 2010 at 5:26 AM, vijay <[email protected]> wrote:

> How to find two missing numbers from an unsorted continuous natural
> numbers array [only use O(1) space and O(n) time]
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<algogeeks%[email protected]>
> .
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to