Re: Find List elements
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Fri, 27 May 2005 19:41:43 GMT
Richard Harter wrote:
> On Fri, 27 May 2005 18:57:35 +0200, "Martijn Mulder" <i@m> wrote:
>
.... snip ...
>
> Perhaps the original poster can clarify his intention; however the
> stated requirement (which you quoted in the beginning of your post)
> was to find whether there is any element in the second list that is
> the same as an element in the first, i.e., are the two sets disjoint.
>
> What you quoted within <quote>...</quote> was his proposed
> implementation.
>
>> so it doesn't matter if they get removed from the first list, from
>> the second list or from a combination of both lists, as long as
>> they get removed.
>>
>>> Anyway, a hash table is the canonical answer, I think. Some
>>> languages that have it built in call it a mapping or something
>>> similar.
>
> At least it is the obvious answer.
No, the obvious answer is to use Pascal:
IF (set1 * set2) = [] THEN writeln('No common members');
--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html
.
- References:
- Find List elements
- From: William
- Re: Find List elements
- From: Martijn Mulder
- Re: Find List elements
- From: Willem
- Re: Find List elements
- From: Martijn Mulder
- Re: Find List elements
- From: Richard Harter
- Find List elements
- Prev by Date: Re: Array Programming Questions
- Next by Date: Re: Regular Expression help
- Previous by thread: Re: Find List elements
- Next by thread: Re: Find List elements
- Index(es):
Relevant Pages
|