Delete a Node, is a HackerRank problem from Linked Lists subdomain. In this post we will see how we can solve this challenge in Python

Problem Description

You’re given the pointer to the head node of a linked list and the position of a node to delete. Delete the node at the given position and return the head node. A position of 0 indicates head, a position of 1 indicates one node away from the head and so on. The list may become empty after you delete ....

You can find the full details of the problem Delete a Node at HackerRank

Solution: Please check the snippet for the solution.

This solution originally posted at: Github by @srgnk