Given the head of a singly linked list and a position (1-based index), delete the node at that position and return the updated head of the linked list.
Note: Position will be valid (i.e, 1 <= position <= linked list length)
[Approach] Single Traversal Deletion - O(n) Time and O(1) Space
Deletion at a specified position in a linked list involves removing a node from a specific index/position, which can be the first, middle, or last node.
To perform the deletion, If the position is 1, we update the head to point to the next node and delete the current head. For other positions, we traverse the list to reach the node just before the specified position. If the target node exists, we adjust the next of this previous node to point to next of next nodes, which will result in skipping the target node.