How to pick exactly* half of the item of a list with equity**?
(*)Half is n/2, the int part of this is enought.
The number of item in the list is more than 10^9. So n/2-1 is not close enought to n to be a noticable approximation.
(**)The principe of equity and fairness mean that every items of the list have the same probality of beeing pick.
I had a Equity Picker like this:
myList.Where(i => rand.NextDouble() >= 0.5);
but with this I can have more/less than half, with a slight chance of all /none of them.
Disclaimer: this is not an home work more a reflexion and modelisation around Thanos Random Picker. The ability to pick half of every population with equity.