예제 #1
0
        public void MergeSortBasic2()
        {
            var m = new List <int> {
                1, 100, 90, 40, -99, 100, 1000, 34, 2
            };

            Sorts.MergeSort(m, 0, m.Count - 1);
            Assert.IsTrue(m[0] == -99);
            Assert.IsTrue(m[8] == 1000);
        }
예제 #2
0
        public void MergeSortBasic()
        {
            var m = new List <int> {
                1, 100, 90, 40
            };

            Sorts.MergeSort(m, 0, m.Count - 1);
            Assert.IsTrue(m[1] == 40);
            Assert.IsTrue(m[3] == 100);
        }