Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1c63f4d

Browse files
committed
Add: test case
1 parent d44264f commit 1c63f4d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎problems/merge-two-sorted-lists/merge_two_sorted_lists_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ func TestMergeTwoLists(t *testing.T) {
3232
},
3333
{
3434
l1: []int{1, 2, 3},
35-
l2: []int{1, 2, 3},
36-
expected: []int{1, 1, 2, 2, 3, 3},
35+
l2: nil,
36+
expected: []int{1, 2, 3},
37+
},
38+
{
39+
l1: []int{1, 2, 3, 8, 16},
40+
l2: []int{1, 2, 3, 10, 12, 24},
41+
expected: []int{1, 1, 2, 2, 3, 3, 8, 10, 12, 16, 24},
3742
},
3843
}
3944
for _, tc := range tests {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /