Total Accepted: 81448
Total Submissions: 214931
Difficulty: Easy
Reverse a singly linked list.
click to show more hints.
Hint:
A linked list can be reversed either iteratively or recursively. Could you implement both?
发现java大部分是最快的,难道是easy题目的原因?
Java:
1 | /** |