mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 20:26:07 -04:00
Create delete_node_without_head.py
This commit is contained in:
parent
d3143cc5fb
commit
7bc4115287
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…
x
Reference in New Issue
Block a user