public static void Test() { MatrixTrie trie = new MatrixTrie(); trie.Put(new int[] { 1, 0, 1 }); trie.Put(new int[] { 1, 0, 0 }); trie.Put(new int[] { 1, 1, 1 }); trie.Put(new int[] { 0, 0, 0 }); }
public static void PrintUniqueRows(int[][] matrix) { MatrixTrie trie = new MatrixTrie(); for (int i = 0; i < matrix.Length; i++) { if (!trie.Contains(matrix[i])) { Console.WriteLine(matrix[i]); trie.Put(matrix[i]); } } }