In this question, it's impossible to delete the last node in Java.
How to solve this problem??
same question here
Interesting question, I think it is impossible since we are only given a single-direction linked list without access to its head.
I think in Java it is impossible......
The last node will always be referenced by its pre node.next
In C++ just delete it.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.