Exemplo n.º 1
0
        public void LeetCode14TestMethod2()
        {
            string[] strings = new string[3] {
                "dog", "racecar", "car"
            };
            var prefix = LeetCode14.LongestCommonPrefix(strings);

            Assert.AreEqual("", prefix);
        }
Exemplo n.º 2
0
        public void LeetCode14TestMethod3()
        {
            string[] strings = new string[2] {
                "aa", "a"
            };
            var prefix = LeetCode14.LongestCommonPrefix(strings);

            Assert.AreEqual("a", prefix);
        }
Exemplo n.º 3
0
        public void LeetCode14TestMethod1()
        {
            string[] strings = new string[3] {
                "flight", "flower", "flow"
            };
            var prefix = LeetCode14.LongestCommonPrefix(strings);

            Assert.AreEqual("fl", prefix);
        }