Example #1
0
        public void Count_LargeArray_CountInReasonableTime()
        {
            NLogN nLogN = new NLogN();

            int[] input = File.ReadAllLines(@"D:\IntegerArray.txt").Select(int.Parse).ToArray();
            Assert.AreEqual(2407905288, nLogN.Count(input));
        }
Example #2
0
 public void Count_2Elements12_Return0()
 {
     Assert.AreEqual(0, _nLogN.Count(new [] { 1, 2 }));
 }