Created
March 1, 2020 10:19
-
-
Save ayende/19b552c8a6a29c8dad8ff02f95d01e09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dic = new Dictionary<string, int> { ["A"] = 0, ["B"] = 0, ["C"] = 0 }; | |
for (int i = 0; i < 10_000; i++) | |
{ | |
var list = new List<string> { "A", "B", "C" }; | |
list.Sort((x, y) => new Random().Next(0, 2)); | |
dic[list[0]]++; | |
} | |
foreach (var kvp in dic) | |
{ | |
Console.WriteLine(kvp.Key + " -> " + kvp.Value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment