
LeetCode
真理的追求者
这个作者很懒,什么都没留下…
展开
-
栈、队列、堆一些题目和算法实现
// 栈、队列、堆一些题目和算法实现/**************************************************** 函数功能: 使用队列实现栈的push,pop,top,empty操作* 参数说明** 日期:2018-06-10-09.31***************************************************/class MySta...原创 2018-06-23 16:39:42 · 770 阅读 · 0 评论 -
Leetcode 链表解法
#include <iostream>#include <vector>#include <algorithm>using namespace std;struct ListNode{ int val; ListNode* next; ListNode(int x):val(x),next(NULL){}};bool cmp1(const Li...原创 2018-06-10 09:21:50 · 201 阅读 · 0 评论 -
LeetCode 关于回溯、递归的一些解题
#include <iostream>#include <vector>#include <set>#include <algorithm>using namespace std;void generate(int i,vector<int>& nums,vector<int>& item,vector&原创 2018-06-30 10:37:42 · 262 阅读 · 0 评论 -
leetcode c++ 动态规划
#include <iostream>#include <vector>#include <algorithm>using namespace std;class Solution{public: /*************************************************** * 函数功能:爬楼梯 * 参数说明 ...原创 2018-07-09 22:07:26 · 391 阅读 · 0 评论 -
字符串与哈希表 leetcode c++实现
#include <iostream>#include <vector>#include <map>#include <algorithm>#include <stack>#include <bitset>#include <string>using namespace std;int g_hasp_map[1&a原创 2018-07-05 20:23:49 · 483 阅读 · 0 评论 -
字符串与哈希表问题 C++实现
#include <iostream>#include <vector>#include <map>#include <algorithm>#include <stack>#include <bitset>#include <string>using namespace std;int g_hasp_map[1&a原创 2018-07-12 15:47:55 · 489 阅读 · 0 评论 -
图搜索 leetcode c++实现
#include <iostream>#include <vector>#include <queue>#include <map>#include <set>#include <unordered_set>#include <algorithm>using namespace std;bool cmp(int a原创 2018-07-07 21:45:12 · 303 阅读 · 0 评论 -
leetcode 关于二叉树的一些题目 C++
#include <iostream>#include <vector>#include <queue>using namespace std;struct TreeNode{ int val; TreeNode* left,*right; TreeNode(int x):val(x),left(NULL),right(NU...原创 2018-07-22 22:11:04 · 378 阅读 · 0 评论 -
31. Next Permutation && Pre Permutation
31. Next Permutation Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it...原创 2018-12-08 11:54:18 · 227 阅读 · 0 评论