Skip to content

Commit 7783a8f

Browse files
authored
Merge pull request #63 from dayiguizhen/patch-1
Finish 222 and update 15
2 parents 1b159b2 + a7e6567 commit 7783a8f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ c. Python2里面继承object的是新式类,没有写父类的是经典类
440440

441441
d. 经典类目前在Python里基本没有应用
442442

443+
e.经典类的MRO是深度优先搜索,新式类的MRO是广度优先搜索
444+
443445
### 16.python中内置的数据结构有几种?
444446
a. 整型 int、 长整型 long、浮点型 float、 复数 complex
445447

@@ -2445,6 +2447,11 @@ redis检查内存使用情况,如果大于maxmemory的限制,则根据设定
24452447

24462448
## 数据结构
24472449
### 222.数组中出现次数超过一半的数字-Python版
2450+
```pythondef
2451+
def majorityElement(nums):
2452+
nums.sort()
2453+
return nums[len(nums)/2]
2454+
```
24482455
### 223.求100以内的质数
24492456
### 224.无重复字符的最长子串-Python实现
24502457
### 225.通过2个5/6升得水壶从池塘得到3升水

0 commit comments

Comments
 (0)