Skip to content

Commit 045adcc

Browse files
committed
#206: description update
1 parent 32f49b1 commit 045adcc

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

c-sharp/Problems/linked-list/ReverseLinkedList.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,25 @@
44
**
55
* Given the head of a singly linked list, reverse the list, and return the reversed list.
66
*
7-
* Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both?
7+
* Example 1:
8+
* Input: head = [1,2,3,4,5]
9+
* Output: [5,4,3,2,1]
10+
*
11+
* Example 2:
12+
* Input: head = [1,2]
13+
* Output: [2,1]
14+
*
15+
* Example 3:
16+
* Input: head = []
17+
* Output: []
18+
*
19+
* Constraints:
20+
* • The number of nodes in the list is the range [0, 5000].
21+
* • -5000 <= Node.val <= 5000
22+
*
23+
* Follow up:
24+
* A linked list can be reversed either iteratively or recursively.
25+
* Could you implement both?
826
**
927
* https://leetcode.com/problems/reverse-linked-list/
1028
***/

0 commit comments

Comments
 (0)