Message 1 of 6
Not applicable
07-10-2012
05:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have 2 lists. Each may have multiple occurrances of the same item. How can I remove one list from another list?
For example bigList = {b,b,c,a,c,c,a}
smallList = {b,b,a}
I'd like it to return something like {c,c,c,a}
I've tried setDifference, and it almost does what I need. But it removes ALL occurrences of an item, which is a problem. Preserving order doesn't matter because I'm planning to sort after this. Ideally it would be rather efficient because each list will have about 20 items, and I'll have to run it about 1000 times.
Solved! Go to Solution.
Reply
Reply