Exemplo n.º 1
0
        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 });
        }
Exemplo n.º 2
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]);
                }
            }
        }
Exemplo n.º 3
0
        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 });
        }
Exemplo n.º 4
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]);
                }
            }
        }