leetcode
共 156 篇文章
leetcode1011. 在 D 天内送达包裹的能力
class Solution {public: int shipWithinDays(vector<int>& weights, int days) { int l=*max_element(weights.begin(),weights.end());
leetcode994. 腐烂的橘子
暂无摘要...
leetcode787. K 站中转内最便宜的航班
暂无摘要...
leetcode743. 网络延迟时间
class Solution {public: int networkDelayTime(vector<vector<int>>& times, int n, int k) { int inf=INT_MAX/2; vector<
leetcode695. 岛屿的最大面积
暂无摘要...
leetcode687. 最长同值路径
暂无摘要...
leetcode463. 岛屿的周长
暂无摘要...
leetcode152. 乘积最大子数组
分析minf存储最小值,maxf存储最大值,每次最大值可能由上一个位置转化而来或者当前位置,再或者从最小值(此时为负数得情况)。class Solution {public: int maxProduct(vector<int>& nums) { vector
leetcode101. 对称二叉树
暂无摘要...
leetcode654. 最大二叉树
暂无摘要...