leetcode
hinanmu
这个作者很懒,什么都没留下…
展开
-
leetcode记录1.Two Sum
leetcode记录1.Two Sum## @lc app=leetcode id=1 lang=python## [1] Two Sum## https://leetcode.com/problems/two-sum/description/## algorithms# Easy (41.79%)# Total Accepted: 1.5M# Total Submis...原创 2019-03-01 11:10:14 · 93 阅读 · 0 评论 -
leetcode记录17. Letter Combinations of a Phone Number
17. Letter Combinations of a Phone NumberRuntime: 4 ms, faster than 100.00% of C++ online submissions for Letter Combinations of a Phone Number.Memory Usage: 8.7 MB, less than 62.00% of C++ online s...原创 2019-04-30 13:41:07 · 171 阅读 · 0 评论 -
leetcode记录40.Combination Sum II
40.Combination Sum IIRuntime: 8 ms, faster than 100.00% of C++ online submissions for Combination Sum II.Memory Usage: 9.8 MB, less than 95.25% of C++ online submissions for Combination Sum II.cl...原创 2019-05-08 15:11:57 · 91 阅读 · 0 评论 -
leetcode记录28. Implement
Runtime: 0 ms, faster than 100.00% of C++ online submissions for Implement strStr().Memory Usage: 9.4 MB, less than 87.77% of C++ online submissions for Implement strStr().class Solution {public:...原创 2019-05-13 20:53:21 · 118 阅读 · 0 评论 -
leetcode记录36. Valid Sudoku
36. Valid Sudoku√ Accepted √ 504/504 cases passed (16 ms) √ Your runtime beats 95.06 % of cpp submissions √ Your memory usage beats 98.53 % of cpp submissions (9.6 MB)/* * @lc app=leetcode ...原创 2019-05-06 16:00:16 · 116 阅读 · 0 评论 -
leetcode记录18. 4Sum
18. 4SumRuntime: 44 ms, faster than 58.56% of C++ online submissions for 4Sum.Memory Usage: 9.5 MB, less than 100.00% of C++ online submissions for 4Sum.class Solution {public: vector<vect...原创 2019-05-01 16:02:28 · 85 阅读 · 0 评论 -
leetcode记录216.Combination Sum III
216.Combination Sum III√ Accepted √ 18/18 cases passed (0 ms) √ Your runtime beats 100 % of cpp submissions √ Your memory usage beats 66.44 % of cpp submissions (8.6 MB)/* * @lc app=leetcod...原创 2019-05-09 14:14:36 · 114 阅读 · 0 评论 -
leetcode记录48.Rotate Image
48.Rotate ImageRuntime: 0 ms, faster than 100.00% of C++ online submissions for Rotate Image.Memory Usage: 9.2 MB, less than 71.51% of C++ online submissions for Rotate Image.class Solution {publ...原创 2019-05-09 15:02:35 · 115 阅读 · 0 评论 -
leetcode记录46. Permutations
46. PermutationsRuntime: 12 ms, faster than 98.08% of C++ online submissions for Permutations.Memory Usage: 9.5 MB, less than 48.25% of C++ online submissions for Permutations.class Solution {pub...原创 2019-05-14 15:09:12 · 87 阅读 · 0 评论 -
leetcode记录32.Longest Valid Parentheses
leetcode记录32.Longest Valid ParentheseshardRuntime: 8 ms, faster than 98.79% of C++ online submissions for Longest Valid Parentheses.Memory Usage: 10.6 MB, less than 80.80% of C++ online submissions...原创 2019-05-07 15:35:33 · 107 阅读 · 0 评论 -
leetcode记录37.Sudoku Solver
37.Sudoku Solver√ Accepted √ 6/6 cases passed (20 ms) √ Your runtime beats 48.74 % of cpp submissions √ Your memory usage beats 10.11 % of cpp submissions (15.6 MB)/* * @lc app=leetcode id=37...原创 2019-05-10 14:27:49 · 128 阅读 · 0 评论 -
leetcode记录27.Remove Element
27.Remove Element√ Accepted √ 113/113 cases passed (8 ms) √ Your runtime beats 37.73 % of cpp submissions √ Your memory usage beats 100 % of cpp submissions (8.5 MB)class Solution {public: ...原创 2019-05-07 22:53:27 · 138 阅读 · 0 评论 -
leetcode记录19. Remove Nth Node From End of List.
19. Remove Nth Node From End of List.Runtime: 4 ms, faster than 86.01% of C++ online submissions for Remove Nth Node From End of List.Memory Usage: 8.4 MB, less than 100.00% of C++ online submission...原创 2019-08-24 10:28:46 · 101 阅读 · 0 评论 -
leetcode记录42. Trapping Rain Water
leetcode记录2. Trapping Rain WaterCategoryDifficultyLikesDislikesalgorithmsHard (44.24%)417377√ Accepted √ 315/315 cases passed (4 ms) √ Your runtime beats 95.99 % of cpp submissi...原创 2019-08-26 17:19:29 · 119 阅读 · 0 评论 -
leetcode记录60.Permutation Sequence
leetcode记录60.Permutation Sequence√ Accepted √ 200/200 cases passed (4 ms) √ Your runtime beats 66.46 % of cpp submissions √ Your memory usage beats 73.68 % of cpp submissions (8.3 MB)class S...原创 2019-08-28 14:50:54 · 164 阅读 · 0 评论 -
leetcode记录62.Unique Paths
leetcode记录62.Unique Paths Accepted √ 62/62 cases passed (4 ms) √ Your runtime beats 55.02 % of cpp submissions √ Your memory usage beats 100 % of cpp submissions (8.1 MB)class Solution {pub...原创 2019-08-28 16:18:11 · 143 阅读 · 0 评论 -
leetcode记录64.Minimum Path Sum
leetcode记录64.Minimum Path Sum√ Accepted √ 61/61 cases passed (8 ms) √ Your runtime beats 87.31 % of cpp submissions √ Your memory usage beats 100 % of cpp submissions (10.3 MB)class Solution...原创 2019-08-29 10:12:37 · 169 阅读 · 0 评论 -
leetcode记录39.Combination Sum
39.Combination Sum√ Accepted √ 168/168 cases passed (20 ms) √ Your runtime beats 59.36 % of cpp submissions √ Your memory usage beats 49.71 % of cpp submissions (11.2 MB)/* * @lc app=leetco...原创 2019-05-08 14:43:05 · 108 阅读 · 0 评论 -
leetcode记录34. Find First and Last Position of Element in Sorted Array
34. Find First and Last Position of Element in Sorted Array√ Accepted √ 88/88 cases passed (8 ms) √ Your runtime beats 99.59 % of cpp submissions √ Your memory usage beats 98.71 % of cpp submis...原创 2019-05-05 15:08:01 · 118 阅读 · 0 评论 -
leetcode记录20. Valid Parentheses
20. Valid ParenthesesRuntime: 4 msMemory Usage: 8.7 MB/* * @lc app=leetcode id=20 lang=cpp * * [20] Valid Parentheses */class Solution {public: bool isValid(string s) { stack<...原创 2019-04-29 16:18:37 · 87 阅读 · 0 评论 -
leetcode记录3.Longest Substring Without Repeating Characters
## @lc app=leetcode id=3 lang=python3## [3] Longest Substring Without Repeating Characters## https://leetcode.com/problems/longest-substring-without-repeating-characters/description/## algorith...原创 2019-03-01 11:11:26 · 100 阅读 · 0 评论 -
leetcode记录7.Reverse Integer
leetcode记录7.Reverse Integer## @lc app=leetcode id=7 lang=python## [7] Reverse Integer## https://leetcode.com/problems/reverse-integer/description/## algorithms# Easy (25.12%)# Total Accepted...原创 2019-03-01 11:12:31 · 125 阅读 · 0 评论 -
leetcode记录4.Median of Two Sorted Arrays
Median of Two Sorted Arraysclass Solution: def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float: if (len(nums1) + len(nums2)) % 2 == 1: return self...原创 2019-03-04 22:17:10 · 73 阅读 · 0 评论 -
leetcode记录5.longest-palindromic-substring
leetcode记录5.longest-palindromic-substringRuntime: 13260 ms, faster than 5.01% of Python3 online submissions for Longest Palindromic Substring.Memory Usage: 12.8 MB, less than 28.70% of Python3 onli...原创 2019-03-04 16:20:42 · 64 阅读 · 0 评论 -
leetcode记录11.Container With Most Water
leetcode记录11.Container With Most Water## @lc app=leetcode id=11 lang=python3## [11] Container With Most Water## https://leetcode.com/problems/container-with-most-water/description/## algorithm...原创 2019-03-10 15:15:45 · 124 阅读 · 0 评论 -
leetcode记录13.Roman to Integer
leetcode记录13.Roman to Integer## @lc app=leetcode id=13 lang=python3## [13] Roman to Integer## https://leetcode.com/problems/roman-to-integer/description/## algorithms# Easy (51.55%)# Total A...原创 2019-03-07 21:56:04 · 100 阅读 · 0 评论 -
leetcode记录2.Add Two Numbers
leetcode记录2.Add Two Numbers## @lc app=leetcode id=2 lang=python3## [2] Add Two Numbers## https://leetcode.com/problems/add-two-numbers/description/## algorithms# Medium (30.58%)# Total Accep...原创 2019-03-07 21:57:16 · 122 阅读 · 0 评论 -
leetcode记录12.Integer to Roman
leetcode记录12.Integer to Roman## @lc app=leetcode id=12 lang=python3## [12] Integer to Roman## https:////leetcode.com//problems//integer-to-roman//description//## algorithms# Medium (49.89%)#...原创 2019-03-12 15:38:17 · 102 阅读 · 0 评论 -
leetcode记录15. 3Sum
leetcode记录15. 3Sumclass Solution {public: vector<vector<int>> threeSum(vector<int>& nums) { sort(nums.begin(), nums.end()); vector<vector<int...原创 2019-03-16 23:15:09 · 83 阅读 · 0 评论 -
leetcode记录22. Generate Parentheses
22. Generate ParenthesesRuntime: 8 ms, faster than 97.28% of C++ online submissions for Generate Parentheses.Memory Usage: 17.8 MB, less than 15.18% of C++ online submissions for Generate Parenthese...原创 2019-05-01 19:48:28 · 101 阅读 · 0 评论 -
leetcode记录29. Divide Two Integers
29. Divide Two Integers√ Accepted √ 989/989 cases passed (4 ms) √ Your runtime beats 100 % of cpp submissions √ Your memory usage beats 99.38 % of cpp submissions (8.3 MB)/* * @lc app=leetc...原创 2019-05-03 14:30:39 · 140 阅读 · 0 评论 -
leetcode记录23. Merge k Sorted Lists
Merge k Sorted Lists√ Accepted √ 131/131 cases passed (40 ms) √ Your runtime beats 45.8 % of cpp submissions √ Your memory usage beats 5.03 % of cpp submissions (25.8 MB)/* * @lc app=leetco...原创 2019-05-03 16:05:50 · 130 阅读 · 0 评论 -
leetcode记录26. Remove Duplicates from Sorted Array
26. Remove Duplicates from Sorted Array√ Accepted √ 161/161 cases passed (24 ms) √ Your runtime beats 98.69 % of cpp submissions √ Your memory usage beats 98.78 % of cpp submissions (10.1 MB)...原创 2019-05-04 14:32:17 · 107 阅读 · 0 评论 -
leetcode记录31. Next Permutation
31. Next Permutation√ Accepted √ 265/265 cases passed (8 ms) √ Your runtime beats 100 % of cpp submissions √ Your memory usage beats 100 % of cpp submissions (8.7 MB)/* * @lc app=leetcode i...原创 2019-05-04 17:10:56 · 105 阅读 · 0 评论 -
leetcode记录10. Regular Expression Matching
10. Regular Expression MatchingRuntime: 16 ms, faster than 57.56% of C++ online submissions for Regular Expression Matching.Memory Usage: 11.5 MB, less than 56.12% of C++ online submissions for Regu...原创 2019-04-29 15:55:09 · 87 阅读 · 0 评论 -
leetcode记录33. Search in Rotated Sorted Array
33. Search in Rotated Sorted Array√ Accepted √ 196/196 cases passed (4 ms) √ Your runtime beats 100 % of cpp submissions √ Your memory usage beats 98.58 % of cpp submissions (8.9 MB)class So...原创 2019-05-05 11:22:13 · 77 阅读 · 0 评论 -
leetcode-hard记录44. Wildcard Matching
√ Accepted √ 1809/1809 cases passed (76 ms) √ Your runtime beats 44.13 % of cpp submissions √ Your memory usage beats 11.54 % of cpp submissions (24.3 MB)class Solution {public: bool...原创 2019-08-30 20:02:44 · 205 阅读 · 0 评论