摘要: https://leetcode.com/problems/divide two integers/ cpp include class Solution { public: int divide(int dividend, int divisor) { long long int a=divide 阅读全文
posted @ 2019-05-13 09:53 benda 阅读(94) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/implement strstr/ cpp class Solution { public: void KMP(string needle, vector &nextval) { nextval[0] = 1;//1长度没有真前后缀的公共部 阅读全文
posted @ 2019-05-13 09:52 benda 阅读(84) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/remove element/ cpp class Solution { public: int removeElement(vector& nums, int val) { if(nums.empty()) return 0; int L 阅读全文
posted @ 2019-05-08 20:20 benda 阅读(94) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/remove duplicates from sorted array/ cpp class Solution { public: int removeDuplicates(vector& nums) { if(nums.empty()) 阅读全文
posted @ 2019-05-08 20:14 benda 阅读(87) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/reverse nodes in k group/ python版本 阅读全文
posted @ 2019-05-08 19:45 benda 阅读(90) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/swap nodes in pairs/ python版本 阅读全文
posted @ 2019-05-08 17:03 benda 阅读(79) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/merge k sorted lists/ python版本 阅读全文
posted @ 2019-05-08 16:40 benda 阅读(86) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/generate parentheses/ python版本 阅读全文
posted @ 2019-05-08 16:19 benda 阅读(111) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/merge two sorted lists/ python版本 阅读全文
posted @ 2019-05-06 23:16 benda 阅读(97) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/valid parentheses/ 阅读全文
posted @ 2019-05-04 09:51 benda 阅读(77) 评论(0) 推荐(0) 编辑