It is known that there is a one-way linked list in the memory, indicating the method is 1 2 3... n
Now, only one node m is provided, and only the node m must be on this one-way linked list.
The requirement is to delete node M.
I don't know where the start point of the one-way linked list is.
The general idea is to find m-1, M-1 to M,
But the problem here is that this is a one-way linked list,
M cannot be found at all.
Therefore, we need to think differently.
The so-called delete operation can be done in another way,
If you know m, you will know m + 1 m + 2... n.
Copy the value of M + 1 to m, and point the next element of m to m + 2.
Then the M node is deleted from the content.
Of course, this deletion is imperfect.
The greatest difficulty for him is to broaden your thinking and not to be limited to the existing knowledge,
First try to solve the problem, and then solve the problem caused by the actual application
PS1: if external data points to the m + 1 address, this may cause problems.
PS2: if it is the last node, it will be over.
If you have other questions, please add