Exemple #1
0
 private static bool thirdDegreeNeighborsTest2()
 {
     int[] solution = ThirdDegreeNeighbors.compute(new int[, ] {
         { 1, 2 }, { 2, 1 }, { 1, 3 }, { 3, 1 }, { 2, 4 }, { 4, 2 }, { 3, 4 }, { 4, 3 }
     }, 1);
     return(new HashSet <int>(solution).SetEquals(new int[] {}));
 }
Exemple #2
0
 private static bool thirdDegreeNeighborsTest6()
 {
     int[] solution = ThirdDegreeNeighbors.compute(new int[, ]
     {
         { 1, 2 }, { 2, 1 }, { 2, 3 }, { 3, 2 }, { 3, 4 },
         { 4, 3 }, { 4, 5 }, { 5, 4 }, { 5, 6 }, { 6, 5 },
         { 6, 7 }, { 7, 6 }, { 7, 8 }, { 8, 7 }, { 8, 1 },
         { 1, 8 }
     }, 1);
     return(new HashSet <int>(solution).SetEquals(new int[] { 4, 6 }));
 }
Exemple #3
0
 private static bool thirdDegreeNeighborsTest3()
 {
     int[] solution = ThirdDegreeNeighbors.compute(new int[, ] {
     }, 1);
     return(new HashSet <int>(solution).SetEquals(new int[] {}));
 }