mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-05-02 06:46:18 -04:00
Create delete_node_without_head.py
This commit is contained in:
parent
d3143cc5fb
commit
7bc4115287
1 changed files with 10 additions and 0 deletions
10
linked_lists/delete_node_without_head.py
Normal file
10
linked_lists/delete_node_without_head.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# author: bt3gl
|
||||
|
||||
|
||||
def delete_node_without_head(node):
|
||||
|
||||
node.val = node.next.val
|
||||
node.next = node.next.next
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue