Skip to content

Commit fe1bf89

Browse files
committed
update populating-next-right-pointers-in-each-node.py
1 parent 716e712 commit fe1bf89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/populating-next-right-pointers-in-each-node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Solution(object):
2020
def connect(self, root):
2121
head = root
2222
while head:
23-
prev, cur, next_head = None, head, None
23+
cur = head
2424
while cur and cur.left:
2525
cur.left.next = cur.right
2626
if cur.next:

0 commit comments

Comments
 (0)