摘要:
##题解 很简单。 class Solution { public: vector<int> plusOne(vector<int>& digits) { int carry = 1; for(int i = digits.size()-1; i >= 0; i--) { int temp = ca 阅读全文
摘要:
题解 入门级的动态规划题。 class Solution { public: bool canJump(vector<int>& nums) { // dp[i] = dp[i-1] vector<int> dp(nums.size(), false); dp[0] = true; for(int 阅读全文
摘要:
题解 双指针法 area = (j-i)*min(height[i], height[j]); class Solution { public: int maxArea(vector<int>& height) { int max_area = 0; int l = 0, r = height.si 阅读全文