Skip to content

Commit bbc7ad3

Browse files
authored
Change ambiguous variable naming
1 parent 4560634 commit bbc7ad3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

remove-nth-node-from-end-of-list/bhyun-kim.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def removeNthFromEnd(self, head: Optional[ListNode], n: int) -> Optional[ListNod
3535

3636
dummy_node = ListNode()
3737
tail = dummy_node
38-
_n = len(vals) - n
39-
vals = vals[:_n] + vals[_n+1:]
38+
idx_to_remove = len(vals) - n
39+
vals = vals[:idx_to_remove] + vals[idx_to_remove+1:]
4040

4141
for v in vals:
4242
tail.next = ListNode(val=v)

0 commit comments

Comments
 (0)