Beispiel #1
0
        public void Trie_WordsLongerThan_Success()
        {
            var expectedResult = new List <Tuple <int, int> >()
            {
                new Tuple <int, int>(0, 1)
            };

            List <string> words = new List <string>()
            {
                "ca", "bac"
            };
            var result = new PalindromePair().PalindromePairsSolution(words.ToArray());

            var areEqual = CollectionsAreEqual.AreEqualListOfTuple(result, expectedResult);

            Assert.IsTrue(areEqual);
        }
Beispiel #2
0
        public void Trie_WordsofEqualLength_Success()
        {
            var expectedResult = new List <Tuple <int, int> >()
            {
                new Tuple <int, int>(0, 1),
                new Tuple <int, int>(1, 0)
            };

            List <string> words = new List <string>()
            {
                "bat", "tab", "cat"
            };
            var result = new PalindromePair().PalindromePairsSolution(words.ToArray());

            var areEqual = CollectionsAreEqual.AreEqualListOfTuple(result, expectedResult);

            Assert.IsTrue(areEqual);
        }