上一页 1 2 3 4 5 6 7 ··· 13 下一页
摘要: 496. 下一个更大元素 I 题目描述: 解法(单调栈+哈希表): class Solution {public: vector nextGreaterElement(vector& nums1, vector& nums2) { int... 阅读全文
posted @ 2019-09-02 11:00 DH_HUSTer 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 解法一(暴力): class Solution {public: vector dailyTemperatures(vector& T) { int n = T.size(); vector res(n, 0);... 阅读全文
posted @ 2019-09-02 09:49 DH_HUSTer 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 解法一: class Solution {public: bool find132pattern(vector& nums) { int n=nums.size(); if(n=nums[i+1]) i++; ... 阅读全文
posted @ 2019-09-01 20:36 DH_HUSTer 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 解法: class Solution {public: int findContentChildren(vector& g, vector& s) { sort(g.begin(),g.end()); sort(... 阅读全文
posted @ 2019-09-01 20:11 DH_HUSTer 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 解法一(暴力法,显然超时): class Solution {public: int fourSumCount(vector& A, vector& B, vector& C, vector& D) { int res=0; ... 阅读全文
posted @ 2019-09-01 20:01 DH_HUSTer 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 解法一(暴力法): class Solution {public: int minMoves(vector& nums) { int res=0; int mmax=0,mmin=0; while(... 阅读全文
posted @ 2019-09-01 19:41 DH_HUSTer 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 解法一: class Solution {public: static bool comp(vector& a, vector& b){ return a[0]>& points) { if(points.emp... 阅读全文
posted @ 2019-08-31 19:56 DH_HUSTer 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 解法: class Solution {public: string frequencySort(string s) { unordered_map ump; for (const auto& str : s) ... 阅读全文
posted @ 2019-08-31 19:17 DH_HUSTer 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 解法一(递归搜索)(超时): class Solution {public: bool canWin(const int& maxChoosableInteger, int desired, unordered_map record) { ... 阅读全文
posted @ 2019-08-31 19:02 DH_HUSTer 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 解法: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x)... 阅读全文
posted @ 2019-08-31 16:12 DH_HUSTer 阅读(12) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 13 下一页