Leetcode
lmwang1234
这个作者很懒,什么都没留下…
展开
-
LeetCode in Python: Remove Duplicates from Sorted Array
LeetCode in PythonRemove Duplicates from Sorted Array (Easy)class Solution: def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ in...原创 2018-10-28 14:16:07 · 93 阅读 · 0 评论 -
LeetCode in Python: Remove Duplicates from Sorted Array II
LeetCode in PythonRemove Duplicates from Sorted Array IIclass Solution: def RemoveDuplicatesFromSortedArrayII(self, nums): if len(nums) <= 1: return len(nums) inde...原创 2018-10-28 14:28:34 · 143 阅读 · 0 评论 -
Create local symlink corresponding to remote github repo
https://stackoverflow.com/questions/15844542/git-symlink-reference-to-a-file-in-an-external-repository$ git submodule add https://github.com/theHilikus/JRoboCom$ ln -s JRoboCom/jrobocom-core/src/mai...转载 2018-11-16 17:23:41 · 125 阅读 · 1 评论 -
[LeetCode] Find minimum number of coins (Dynamic Programming)
Ex1:Input: coins[] = {25, 10, 5}, V = 30Output: minimum 2 coins requiredEx2:Input: coins[] = {9, 6, 5, 1}, V = 11Output: minimum 2 coins requiredRecursive SolutionIf V == 0, then 0 coins requir...原创 2019-01-02 10:57:46 · 132 阅读 · 0 评论 -
Leetcode 3. 无重复字符的最长子串
class Solution(object): def lengthOfLongestSubstring(self, s): """ :type s: str :rtype: int """ start = 0 rec = {} cur_len = 0 ans =...原创 2019-07-26 15:51:17 · 105 阅读 · 0 评论