自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 leetcode 旋转数组 python

class Solution: def rotate(self, nums: List[int], k: int) -> None: """ Do not return anything, modify nums in-place instead. """ n = 0 while n<k: c = nums.pop() nums.insert(0,c)

2021-03-16 08:59:17 47

原创 leetcode 两数之和 python

class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: lens = len(nums) for i in range(lens): for j in range(lens): if i!=j: if nums[i] +nums[j] == target:

2021-03-16 08:48:00 42

原创 leetcode 有效的字母异位词 python

class Solution: def isAnagram(self, s: str, t: str) -> bool: li =[] for i in s: li.append(i) li.sort() lis = [] for i in t: lis.append(i) lis.sort() if li == lis: .

2021-03-15 18:44:11 38

原创 leetcode 验证回文串 python

class Solution: def isPalindrome(self, s: str) -> bool: li = [] for i in s: if 65 <= ord(i) <= 90 or 97 <= ord(i) <= 122 or 48 <=ord(i) <= 57: li.append(i) lens = len(li) if lens %2 == 0: r = '' l = '' b

2021-03-15 18:34:50 65

空空如也

空空如也

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

TA关注的人

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