예제 #1
0
        public void NullOrEmptyArray_Success()
        {
            int[] arr    = null;
            var   sol    = new ArrayPartition1(arr);
            var   result = sol.GetSumOfMin();

            Assert.AreEqual(0, result);
        }
예제 #2
0
        public void FirstArray_Success()
        {
            int[] arr    = { 1, 4, 3, 2 };
            var   sol    = new ArrayPartition1(arr);
            var   result = sol.GetSumOfMin();

            Assert.AreEqual(4, result);
        }