The question requires that: we are not given access to the head of linked list. We only have access to the node which is going to be deleted.
So the solution is simply copying next node to the node which is going to be deleted.
void deleteNode(ListNode* node) {
ListNode* tmp = node->next;
*node = *node->next;
delete tmp;
}