自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小堃哥的专栏

写博客:网址链接+名称:oj名+所用算法名称+该题注意事项和心得

  • 博客(8)
  • 资源 (1)
  • 收藏
  • 关注

原创 leetcode795+最大值在LR之间的连续的子数组个数,剪枝

https://leetcode.com/problems/number-of-subarrays-with-bounded-maximum/class Solution {public: int numSubarrayBoundedMax(vector<int>& A, int L, int R) { int res = 0, len = A....

2019-02-28 23:49:37 280

原创 leetcode797+所有0->N-1的路径,递归DFS

https://leetcode.com/problems/all-paths-from-source-to-target///0 -> N-1class Solution {public: void helper(vector<vector<int>>& graph, int cur, vector<int>path, vect...

2019-02-28 23:09:58 189

原创 leetcode787+s到目的地最多停K次最小花费,Dp

https://leetcode.com/problems/cheapest-flights-within-k-stops/class Solution {public: int findCheapestPrice(int n, vector<vector<int>>& flights, int src, int dst, int K) { ...

2019-02-24 21:59:55 559

原创 leetcode785+二部图染色问题,BFS

https://leetcode.com/problems/is-graph-bipartite/class Solution {public: bool isBipartite(vector<vector<int>>& graph) { vector<int> colors(graph.size()); ...

2019-02-17 22:18:20 770

原创 leetcode791+T中包含S的字符按S排序,map的使用

https://leetcode.com/problems/custom-sort-string/class Solution {public: string customSortString(string S, string T) { string res = ""; map<char, int>mp; for(auto...

2019-02-10 23:44:29 172

原创 leetcode771+S字符串中有多少J中的字符,hash

https://leetcode.com/problems/jewels-and-stones/class Solution {public: int numJewelsInStones(string J, string S) { int res = 0; set<char> st; for(char c : J) st....

2019-02-05 18:24:33 144

原创 leetcode765+调整数组变成couple对都是在一起,贪心

https://leetcode.com/problems/couples-holding-hands/class Solution {public: int minSwapsCouples(vector<int>& row) { int res = 0, len = row.size(); for(int i=0; i<l...

2019-02-05 17:56:22 160

原创 leetcode769+划分数组最多多少段,内部排序能成最后的有序数组,有trick

https://leetcode.com/problems/max-chunks-to-make-sorted/class Solution {public: int maxChunksToSorted(vector<int>& arr) { int res = 0, len = arr.size(), mx = 0; for(i...

2019-02-01 00:24:06 249

c语言版贪吃蛇

很好的一个源代码,相当不错

2014-01-24

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除