Ejemplo n.º 1
0
        public void GetLeastFrequentLetterReturnsCorrectValue(string sequence, string expected)
        {
            var sut = new AdventOfCode2016.Day6.Day6(sequence);

            var actual = sut.GetRepeatedLetters(RepetitionCode.LeastFrequent);

            Assert.Equal(expected, actual);
        }
Ejemplo n.º 2
0
        private static void Day6Puzzle1()
        {
            var reader        = new StreamReader(@"..\..\Day6\input.txt");
            var d6p1          = new Day6.Day6(reader.ReadToEnd());
            var mostFrequent  = d6p1.GetRepeatedLetters(Day6.RepetitionCode.MostFrequent);
            var leastFrequent = d6p1.GetRepeatedLetters(Day6.RepetitionCode.LeastFrequent);

            Console.WriteLine($"Most frequent: {mostFrequent}");
            Console.WriteLine($"Least frequent: {leastFrequent}");
        }