摘要:
class Solution { public: int longestValidParentheses(string s) { stack<int> stk; int res = 0; // start表示上一段第一次出现不合法的括号序列的右括号的位置 for(int i = 0, start = 阅读全文
摘要:
根本思想就是二进制能够表示任意类型的数。 class Solution { public: double myPow(double x, int n) { // 为了防止判断n为负数取反时造成溢出 // 用long long 类型接收 long long N = n; // 记录N是否是负数 int 阅读全文