Delete Node in a Linked List (LeetCode 237).
Asked in the coding round stage. Only main logic written.
The function receives a serialized singly linked list and the index of the node to delete. Build the linked-list representation internally, remove the specified node, and return the remaining values as a list.
values is a non-empty list of integers. delete_index is a valid zero-based index. Return a list containing the values after deletion.
def delete_node(values, delete_index):