摘要:
问题: 给定由 "(" 和 ")" 构成的字符串, 求其中完全匹配的子串,最长长度为多少。 Example 1: Input: s = "(()" Output: 2 Explanation: The longest valid parentheses substring is "()". Exam 阅读全文
摘要:
问题: 爬楼梯问题。 给定n阶台阶,一次可以爬一阶or两阶。 求一共有多少种爬楼梯的方法。 Example 1: Input: n = 2 Output: 2 Explanation: There are two ways to climb to the top. 1. 1 step + 1 ste 阅读全文