public void LongestValidParenthesesTest()
        {
            var solution = new _032_LongestValidParentheses();
            var result = solution.LongestValidParentheses("()");
            Assert.AreEqual(2, result);

            result = solution.LongestValidParentheses("(()())");
            Assert.AreEqual(6, result);
        }
Beispiel #2
0
        public void LongestValidParenthesesTest()
        {
            var solution = new _032_LongestValidParentheses();
            var result   = solution.LongestValidParentheses("()");

            Assert.AreEqual(2, result);

            result = solution.LongestValidParentheses("(()())");
            Assert.AreEqual(6, result);
        }