Skip to content

Commit 25eee5a

Browse files
authored
Merge branch 'youngyangyang04:master' into master
2 parents 2dcfe3f + ecb4292 commit 25eee5a

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,8 @@
555555
也欢迎与我交流,备注:「个人简单介绍」 + 交流,围观朋友圈,做点赞之交(备注没有自我介绍不通过哦)
556556

557557
<a name="微信"></a>
558-
<img src="https://img-blog.csdnimg.cn/20200814140330894.png" data-img="1" width="175" height="175">
558+
<div align="center"><img src="https://code-thinking-1253855093.file.myqcloud.com/pics/WechatIMG82.jpeg" data-img="1" width="200" height="200"></img></div>
559+
559560

560561
# 公众号
561562

@@ -566,6 +567,6 @@
566567
**来看看就知道了,你会发现相见恨晚!**
567568

568569
<a name="公众号"></a>
570+
<div align="center"><img src="https://code-thinking-1253855093.file.myqcloud.com/pics/20211026122841.png" data-img="1" width="650" height="500"></img></div>
569571

570-
![](./pics/公众号.png)
571572

problems/0037.解数独.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class Solution {
286286
```
287287

288288
### Python
289-
```python3
289+
```python
290290
class Solution:
291291
def solveSudoku(self, board: List[List[str]]) -> None:
292292
"""

problems/1356.根据数字二进制下1的数目排序.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,17 @@ class Solution {
156156
## Python
157157

158158
```python
159+
class Solution:
160+
def sortByBits(self, arr: List[int]) -> List[int]:
161+
arr.sort(key=lambda num: (self.count_bits(num), num))
162+
return arr
163+
164+
def count_bits(self, num: int) -> int:
165+
count = 0
166+
while num:
167+
num &= num - 1
168+
count += 1
169+
return count
159170
```
160171

161172
## Go

problems/回溯总结.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,11 @@ N皇后问题分析:
430430

431431
同样也感谢录友们的坚持,这也是我持续写作的动力,**正是因为大家的积极参与,我才知道这件事件是非常有意义的**
432432

433-
最后希望大家可以转发这篇文章给身边的朋友们,因为还有很多学习算法的小伙伴依然在浩如烟海的信息中迷茫,而我相信「代码随想录」会让大家少走弯路!
433+
回溯专题汇聚为一张图:
434+
435+
![](https://code-thinking-1253855093.file.myqcloud.com/pics/20211025180652.png)
436+
437+
这个图是 [代码随想录知识星球](https://mp.weixin.qq.com/s/QVF6upVMSbgvZy8lHZS3CQ) 成员:莫非毛,所画,总结的非常好,分享给大家。
434438

435439
**回溯算法系列正式结束,新的系列终将开始,录友们准备开启新的征程!**
436440

0 commit comments

Comments
 (0)