Пример #1
0
 public void NonDecreasingTest()
 {
     Assert.AreEqual(true, MonotoneTravel.IsMonotone(new int[] { 1, 2, 3, 3, 4, 5 }));
 }
Пример #2
0
 public void DecreasingTest()
 {
     Assert.AreEqual(false, MonotoneTravel.IsMonotone(Enumerable.Range(1, 5).Reverse().ToArray()));
 }
Пример #3
0
 public void ConstantTest()
 {
     Assert.AreEqual(true, MonotoneTravel.IsMonotone(new int[] { 5, 5, 5, 5, 5 }));
 }
Пример #4
0
 public void EmptyTest()
 {
     Assert.AreEqual(true, MonotoneTravel.IsMonotone(new int[] { }));
 }
Пример #5
0
 public void IncreasingTest()
 {
     Assert.AreEqual(true, MonotoneTravel.IsMonotone(Enumerable.Range(1, 10).ToArray()));
     Assert.AreEqual(true, MonotoneTravel.IsMonotone(Enumerable.Range(4, 9).ToArray()));
 }