Update 3_leetcode66.py

This commit is contained in:
SunnyQjm authored and GitHub committed 2020-06-20 19:38:25 +08:00
1 parent 70c0e8f56d
commit c329bf9c8e
1 file changed
+1 -1
+1 -1
View File
@@ -31,7 +31,7 @@ class Solution:
算法思路:
1. 从最末尾开始遍历;
2. 堆当前元素+1,不足10则结束,满10则执行进位
2. 对当前元素+1,不足10则结束,满10则执行进位
=> 进位就将当前元素值置为0,然后下标左移,继续判断
3. 如果遍历到头元素了还有进位,则需要在头元素之前插入一个元素,值为1