Skip to content

Commit 0a35436

Browse files
committed
#21: description update
1 parent 9123f93 commit 0a35436

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,29 @@
33
* Merge Two Sorted Lists
44
**
55
* You are given the heads of two sorted linked lists list1 and list2.
6-
*
76
* Merge the two lists into one sorted list.
87
* The list should be made by splicing together the nodes of the first two lists.
98
*
109
* Return the head of the merged linked list.
1110
*
1211
* Both list1 and list2 are sorted in non-decreasing order.
12+
*
13+
* Example 1:
14+
* Input: list1 = [1,2,4], list2 = [1,3,4]
15+
* Output: [1,1,2,3,4,4]
16+
*
17+
* Example 2:
18+
* Input: list1 = [], list2 = []
19+
* Output: []
20+
*
21+
* Example 3:
22+
* Input: list1 = [], list2 = [0]
23+
* Output: [0]
24+
*
25+
* Constraints:
26+
* • The number of nodes in both lists is in the range [0, 50].
27+
* • -100 <= Node.val <= 100
28+
* • Both list1 and list2 are sorted in non-decreasing order.
1329
**
1430
* https://leetcode.com/problems/merge-two-sorted-lists/
1531
***/

0 commit comments

Comments
 (0)