1.
make boolean array flag of size 1001 of all values false.

2.
for all i in B
   flag[B[i]]  = true;

3.
for all j in A
{
 if(!flag[A[j]])
    print A[j]
}

On Wed, Nov 3, 2010 at 12:16 AM, kanika suri <[email protected]>wrote:

> Given two Arrays A and B containing set of n integers iin range [1-1000].
> Write an algorithm of complexity order n that prints the elements in array
> A which are missing in array B.
>
>
>
>
> --
> regards
> kanika suri
> MCS 2nd yr
> DUCS
> University of Delhi
>
>  --
> 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.
>



-- 
Yours affectionately,
Prashant Thorat
Computer Science and Engg. Dept,
NIT Durgapur.

-- 
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