Java
Hint: Maintain two pointers and update one with a delay of n steps.
1 | /** |
Submission Detail
- 208 / 208 test cases passed.
- Runtime: 6 ms, faster than 98.72% of Java online submissions for Remove Nth Node From End of List.
- Memory Usage: 38 MB, less than 100.00% of Java online submissions for Remove Nth Node From End of List.