How to calculate
subtraction (set operation) of ordered lists in C#?
E.g. after execution
of code:
List<int> a = new int[] { 1, 2, 5, 6, 7}.ToList();
List<int> b = new int[] { 1, 2, 3, 6}.ToList();
List<int> c = ListSubtract(a, b);
c should contains 5, 7.
It would be good to
perform in O(a.Count()+b.Count()) operations, but it is not critical.
Solution use of Except in Linq
Operator
List<int> c = a.Except(b).ToList();
Develop Marketing, Advertising and Campaign Management Techniques. Learn how to Research and Build the correct Marketing Strategies for key stakeholders. Pay Per Click Marketing. Google Ads.
ReplyDeletebest digital marketing, digital marketing, skartec digital marketing, skartec digital marketing academy, seo training in chennai, best seo service in chennai, digital marketing blog,seo company in chennai,seo course in chennai,seo training in chennai,digital marketing course in chennai,digital marketing course fees,,digital marketing training in chennai,online digital marketing courses,best digital marketing course,digital marketing classes,digital marketing institute,digital marketing training institute,best digital marketing course in chennai,online marketing courses,digital marketing institute in chennai,digital marketing training,digital marketing course,best online digital marketing courses,advanced digital marketing course,digital marketing course duration,digital marketing couse fees,digital marketing couse fees in chennai,best seo service in hennai,digital marketing blog