Create delete_node_without_head.py

This commit is contained in:
marina 2023-08-02 21:29:02 -07:00 committed by GitHub
parent d3143cc5fb
commit 7bc4115287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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