![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
wzw&weiye
奋斗的码学生
展开
-
leetcode刷题日记(三)—— 递归回溯
#46. 全排列class Solution: def permute(self, nums): if len(nums) == 0: return [] if len(nums) == 1: return [[nums[0]]] result = [] for i,v in enumerate(nums): tmp = self.permute(nums[:i]...原创 2020-05-09 12:18:10 · 242 阅读 · 0 评论 -
leetcode刷题日记(二)—— 查找 Set和Hashmap
# 查找,如果强调存在,用SET,如果强调个数或有时需要顺序,用DIC#202 快乐数class Solution: def isHappy(self, n: int) -> bool: s = set() while 1: print(s) tmp = 0 while n !...原创 2020-05-04 09:55:47 · 236 阅读 · 0 评论 -
leetcode
1. Two sum2. Add Two Numbers3.Longest Substring Without Repeating Characters4Median of Two Sorted Arrays原创 2018-03-27 14:28:12 · 129 阅读 · 0 评论 -
leetcode-Reverse Integer
原创 2018-03-27 14:29:19 · 152 阅读 · 0 评论 -
leetcode-5.Longest Palindromic Substring
原创 2018-03-28 13:29:09 · 151 阅读 · 0 评论