Esempio n. 1
0
 private static bool longestPathITest5()
 {
     int[] solution = LongestPathI.compute(new int[, ] {
         { 1, 1 }
     });
     return(solution.SequenceEqual(new int[] { 1 }));
 }
Esempio n. 2
0
 private static bool longestPathITest2()
 {
     int[] solution = LongestPathI.compute(new int[, ] {
         { 6, 5 }, { 6, 4 }, { 5, 4 }, { 4, 3 }, { 2, 3 }, { 1, 2 }, { 4, 1 }
     });
     return(solution.SequenceEqual(new int[] { 6, 5, 4, 1, 2, 3 }));
 }
Esempio n. 3
0
 private static bool longestPathITest1()
 {
     int[] solution = LongestPathI.compute(new int[, ] {
         { 1, 2 }, { 2, 3 }, { 1, 3 }
     });
     return(solution.SequenceEqual(new int[] { 1, 2, 3 }));
 }
Esempio n. 4
0
 private static bool longestPathITest4()
 {
     int[] solution = LongestPathI.compute(new int[, ] {
         { 1, 2 }, { 2, 4 }, { 4, 6 }, { 1, 3 }, { 3, 5 }, { 5, 7 }
     });
     return(solution.SequenceEqual(new int[] { 1, 2, 4, 6 }) ||
            solution.SequenceEqual(new int[] { 1, 3, 5, 7 }));
 }