in reply to Re: ugly nested if's
in thread ugly nested if's
However, it was my understanding the OP wanted to know whether the first list contains entries that aren't in the second list. This is a FAQ, and a hash solution ought to be used, as that gives you linear behaviour (assuming all your hash inserts go in constant time on average). A grep method will be quadratic, and for any list that doesn't have a trivial size, it should not be taking into consideration. After all, both methods use a linear amount of memory.
Abigail
|
|---|