Find Nth node from lastUse two pointers. Separate them by N and traverse. When one of the pointers reaches the end, the other pointer is at Nth node from the last. |
Got a thought to share or found a
bug in the code?
We'd love to hear from you:
Name: | |
Email: | (Your email is not shared with anybody) |
Comment: |
Facebook comments: