上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 27 下一页

2020年5月19日

lc 岛屿的最大面积

摘要: 链接:https://leetcode-cn.com/problems/max-area-of-island/ 代码: class Solution { public: int maxAreaOfIsland(vector<vector<int>>& grid) { int dp[55][55]; 阅读全文

posted @ 2020-05-19 23:23 FriskyPuppy 阅读(134) 评论(0) 推荐(0) 编辑

lc 三数之和

摘要: 链接:https://leetcode-cn.com/problems/3sum/ 代码: #include <vector> #include <iterator> #include <algorithm> using namespace std; class Solution { public: 阅读全文

posted @ 2020-05-19 23:06 FriskyPuppy 阅读(159) 评论(0) 推荐(0) 编辑

2020年5月18日

lc 数组中的第K个最大元素

摘要: 链接:https://leetcode-cn.com/problems/kth-largest-element-in-an-array/ 代码: class Solution { public: int findKthLargest(vector<int>& nums, int k) { k--; 阅读全文

posted @ 2020-05-18 00:42 FriskyPuppy 阅读(200) 评论(0) 推荐(0) 编辑

lc 买卖股票的最佳时机 II

摘要: 链接:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-ii/ 代码: class Solution { public: int maxProfit(vector<int>& prices) { if(prices.si 阅读全文

posted @ 2020-05-18 00:38 FriskyPuppy 阅读(156) 评论(0) 推荐(0) 编辑

lc 买卖股票的最佳时机

摘要: 链接:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/ 代码: #include<iostream> #include<algorithm> class Solution { public: int maxProfit 阅读全文

posted @ 2020-05-18 00:34 FriskyPuppy 阅读(288) 评论(0) 推荐(0) 编辑

lc 无重复字符的最长子串

摘要: 链接:https://leetcode-cn.com/explore/interview/card/bytedance/242/string/1012/ 代码: #include<algorithm> class Solution { public: int lengthOfLongestSubst 阅读全文

posted @ 2020-05-18 00:21 FriskyPuppy 阅读(154) 评论(0) 推荐(0) 编辑

lc 最长公共前缀

摘要: 链接:https://leetcode-cn.com/explore/interview/card/bytedance/242/string/1014/ 代码: class Solution { public: string longestCommonPrefix(vector<string>& s 阅读全文

posted @ 2020-05-18 00:14 FriskyPuppy 阅读(137) 评论(0) 推荐(0) 编辑

lc 字符串的排列

摘要: 链接:https://leetcode-cn.com/explore/interview/card/bytedance/242/string/1016/ 代码: class Solution { public: bool checkInclusion(string s1, string s2) { 阅读全文

posted @ 2020-05-18 00:13 FriskyPuppy 阅读(171) 评论(0) 推荐(0) 编辑

lc 字符串相乘

摘要: 链接:https://leetcode-cn.com/explore/interview/card/bytedance/242/string/1015/ 代码: #include <iostream> #include <algorithm> using namespace std; class S 阅读全文

posted @ 2020-05-18 00:08 FriskyPuppy 阅读(240) 评论(0) 推荐(0) 编辑

lc 翻转字符串里的单词

摘要: 链接:https://leetcode-cn.com/explore/interview/card/bytedance/242/string/1011/ 代码: class Solution { public: string reverseWords(string s) { int len = s. 阅读全文

posted @ 2020-05-18 00:04 FriskyPuppy 阅读(143) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 27 下一页

导航