The power of Span
05/04/2019
Intro to the problem
In one organization, I had to schedule a regular meeting once a week, that fits most the people. Fortunately, the people in this organization mark their holidays in a csv file, so processing the file can help me to figure the day when the least favorable for holidays.For this I would like to have a table which shows the given weekday, and the number of holidays taken on that day.
As a note, we can assume people include public holidays to the time interval in the file, as they usually do so. They also include Saturdays and Sundays too, but those will be filtered out.
Fortunately, we can have two solutions for this problem. On is the classic solution in the 'old' C# way, and one new solution from the Span
era of dotnet with a more efficient solution.