Beispiel #1
0
        public void PalindromePairsTest_3()
        {
            var solution = new _0336_PalindromePairs();
            var result   = solution.PalindromePairs(new string[] { "a", "" });

            AssertHelper.AssertList(
                new List <IList <int> >
            {
                new List <int> {
                    0, 1
                },
                new List <int> {
                    1, 0
                },
            }, result);
        }
Beispiel #2
0
        public void PalindromePairsTest_1()
        {
            var solution = new _0336_PalindromePairs();
            var result   = solution.PalindromePairs(new string[] { "abcd", "dcba", "lls", "s", "sssll" });

            AssertHelper.AssertList(
                new List <IList <int> >
            {
                new List <int> {
                    1, 0
                },
                new List <int> {
                    0, 1
                },
                new List <int> {
                    3, 2
                },
                new List <int> {
                    2, 4
                },
            }, result);
        }