223
List<string> listA = new List<string> { "a", "7", "1", "2", "3", "4", "5", "9", "7", "7", "1","222222222222222222","22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222323" };
1
using System;
2
using System.Collections;
3
using System.Collections.Generic;
4
using System.Linq;
5
using System.Diagnostics;
6
7
//CHALLENGE - Get difference between two unorderd, not unique lists, duplicates allowed within a list and across both lists.
8
//SOLUTION - https://metadataconsulting.blogspot.com/2021/02/CSharp-dotNet-Get-difference-between-two-unordered-not-unique-lists-aka-duplicates-allowed-within-a-list-and-across-both-lists.html
9
//OPTIMIZE - THIS IS IT using BitArray - https://metadataconsulting.blogspot.com/2021/02/CSharp-dotNet-Get-difference-between-two-unordered-not-unique-lists-lightning-fast-optimized.html
10
//OPTIMIZEv2 - All BitArray imp - https://metadataconsulting.blogspot.com/2021/02/CSharp-dotNet-Get-difference-between-two-unordered-not-unique-lists-using-BitArrays-for-super-fast-speed.html
11
// - use ExceptIndistinct for >100 items
12
public static class Program
13
{
14
public static int loopcnt = 0;
15
16
//https://stackoverflow.com/questions/2975944/except-has-similar-effect-to-distinct
17
public static IEnumerable<T> ExceptFrom<T>(
18
this IEnumerable<T> first,
19
IEnumerable<T> second) //,
20
//IEqualityComparer<TSource> comparer)
21
{
22
if (first == null)
23
throw new ArgumentNullException();
24
Cached Result
Tile ID: SBG | Tile Description: Small black granite | Tile Price: 19.5
Tile ID: SGM | Tile Description: Small grey marble | Tile Price: 25.95
Tile ID: SPB | Tile Description: Small powder blue | Tile Price: 35.75
Tile ID: MSY | Tile Description: Medium sunset yellow | Tile Price: 12.5
Tile ID: MBR | Tile Description: Medium berry red | Tile Price: 11
Tile ID: MGP | Tile Description: Medium glitter purple | Tile Price: 52.95
Tile ID: LOW | Tile Description: Large oak wood effect | Tile Price: 65
Tile ID: LBG | Tile Description: Large black granite | Tile Price: 58.98
Tile ID: LBR | Tile Description: Large bamboo effect | Tile Price: 85
Tile ID: LWM | Tile Description: Extra-large white marble | Tile Price: 62.75
Please input the height of your wall:
>
Tile ID: SGM | Tile Description: Small grey marble | Tile Price: 25.95
Tile ID: SPB | Tile Description: Small powder blue | Tile Price: 35.75
Tile ID: MSY | Tile Description: Medium sunset yellow | Tile Price: 12.5
Tile ID: MBR | Tile Description: Medium berry red | Tile Price: 11
Tile ID: MGP | Tile Description: Medium glitter purple | Tile Price: 52.95
Tile ID: LOW | Tile Description: Large oak wood effect | Tile Price: 65
Tile ID: LBG | Tile Description: Large black granite | Tile Price: 58.98
Tile ID: LBR | Tile Description: Large bamboo effect | Tile Price: 85
Tile ID: LWM | Tile Description: Extra-large white marble | Tile Price: 62.75
Please input the height of your wall: