Connecting Tech Pros Worldwide Help | Site Map

Removing elements from a list that are elements in another list

Adam Hartshorne
Guest
 
Posts: n/a
#1: Jan 26 '06
Hi All,

I was wondering if somebody could tell me if there is an efficient way
to do the following. Say I have a list(or vector) A and a list B, I want
to remove any elements in B, that are also elements in A.

Adam
Victor Bazarov
Guest
 
Posts: n/a
#2: Jan 26 '06

re: Removing elements from a list that are elements in another list


Adam Hartshorne wrote:[color=blue]
> Hi All,
> [...][/color]

Refrain from posting twice please. Patience is a virtue.
Nitin Motgi
Guest
 
Posts: n/a
#3: Jan 27 '06

re: Removing elements from a list that are elements in another list


Adam Hartshorne wrote:[color=blue]
> Hi All,
>
> I was wondering if somebody could tell me if there is an efficient way
> to do the following. Say I have a list(or vector) A and a list B, I want
> to remove any elements in B, that are also elements in A.
>
> Adam[/color]

Can you provide more information about the elements in the list or
vector.Like the type information. Because efficient algorithm IMO would
depend on the type of data in the vector/list. So if you could provide
that data I could give it a try.

Thank you,
Nitin Motgi

Closed Thread