File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 555
555
也欢迎与我交流,备注:「个人简单介绍」 + 交流,围观朋友圈,做点赞之交(备注没有自我介绍不通过哦)
556
556
557
557
<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
+
559
560
560
561
# 公众号
561
562
566
567
** 来看看就知道了,你会发现相见恨晚!**
567
568
568
569
<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 >
569
571
570
- ![ ] ( ./pics/公众号.png )
571
572
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ class Solution {
286
286
```
287
287
288
288
### Python
289
- ``` python3
289
+ ``` python
290
290
class Solution :
291
291
def solveSudoku (self , board : List[List[str ]]) -> None :
292
292
"""
Original file line number Diff line number Diff line change @@ -156,6 +156,17 @@ class Solution {
156
156
## Python
157
157
158
158
``` 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
159
170
```
160
171
161
172
## Go
Original file line number Diff line number Diff line change @@ -430,7 +430,11 @@ N皇后问题分析:
430
430
431
431
同样也感谢录友们的坚持,这也是我持续写作的动力,** 正是因为大家的积极参与,我才知道这件事件是非常有意义的** 。
432
432
433
- 最后希望大家可以转发这篇文章给身边的朋友们,因为还有很多学习算法的小伙伴依然在浩如烟海的信息中迷茫,而我相信「代码随想录」会让大家少走弯路!
433
+ 回溯专题汇聚为一张图:
434
+
435
+ ![ ] ( https://code-thinking-1253855093.file.myqcloud.com/pics/20211025180652.png )
436
+
437
+ 这个图是 [ 代码随想录知识星球] ( https://mp.weixin.qq.com/s/QVF6upVMSbgvZy8lHZS3CQ ) 成员:莫非毛,所画,总结的非常好,分享给大家。
434
438
435
439
** 回溯算法系列正式结束,新的系列终将开始,录友们准备开启新的征程!**
436
440
You can’t perform that action at this time.
0 commit comments