自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 c++相关基础知识

C++相关基础知识 1. 编译内存相关 1.1. C++ 程序编译过程 1.2. C++ 内存管理 1.3. 栈和堆的区别 1.4. 变量的区别 1.5. 全局变量定义在头文件中有什么问题? 1.6. 内存对齐 1.7. 什么是内存泄露 1.8. 怎么防止内存泄漏?内存泄漏检测工具的原理? 1.9. 智能指针有哪几种?智能指针的实现原理? 1.10. 一个 unique_ptr 怎么赋值给另一个 unique_ptr 对象? ...

2022-04-23 20:56:31 409

原创 100eahot

1 pas 20 class Solution: def isValid(self, s: str) -> bool: dic={')':'(',']':'[','}':'{'} res = [] for i in s: if i in dic.keys(): if not res or res[-1] != dic[i]: return F..

2022-04-10 21:45:29 100

原创 100midhot

#2 class Solution(object): def addTwoNumbers(self, l1, l2): """ :type l1: ListNode :type l2: ListNode :rtype: ListNode """ temp = ListNode(0) res = temp add = 0 while l1 or l2: ...

2022-04-10 21:43:43 198

原创 s-5-6

500 class Solution: def findWords(self, words: List[str]) -> List[str]: hash_map = '12210111011122000010020202' ans = [] for word in words: idx = hash_map[ord(word[0].lower()) - ord('a')] if all(has.

2022-03-20 23:59:34 233

原创 s-4-5

401 class Solution: def readBinaryWatch(self, num: int) -> List[str]: bins = [str(bin(i))[2:].count('1') for i in range(60)] results = [] for hour in range(12): for minute in range(60): if bins[.

2022-03-20 23:58:51 237

原创 s-3-4

303 class NumArray: def __init__(self, nums: List[int]): self.sums = [0] _sums = self.sums for num in nums: _sums.append(_sums[-1] + num) def sumRange(self, i: int, j: int) -> int: _sums = self.s.

2022-03-20 23:58:08 77

原创 s-2-3

202 class Solution: def isHappy(self, n: int) -> bool: numSet = set() while n not in numSet: numSet.add(n) new = 0 for i in str(n): new += int(i) ** 2 if new == 1: ..

2022-03-20 23:57:25 85

原创 s-1-2

101 class Solution: def isSymmetric(self, root: TreeNode) -> bool: if not root:return True def dfs(node1, node2): if node1 and not node2: return False elif not node1 and node2: ...

2022-03-20 23:56:40 136

原创 s-0-1

7 class Solution: def reverse(self, x: int) -> int: flag = False if x > 0: flag = True num = x else: num = (-1)*x str_x = str(num)[::-1] cnt = 0 for i in st...

2022-03-20 23:55:45 224

原创 jz-1111

03 #find chongfu shu #pass class Solution: def findRepeatNumber(self, nums: List[int]) -> int: set_ = set() for num in nums: if num not in set_: set_.add(num) else: return nu.

2022-03-20 23:51:59 164

空空如也

空空如也

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

TA关注的人

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