feat(content): more test cases
This commit is contained in:
@@ -10,6 +10,26 @@ patterns:
|
||||
- fast-slow-pointers
|
||||
- linkedlist-reversal
|
||||
|
||||
function_signature: "def reorder_list(head: ListNode) -> None:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { head: [1, 2, 3, 4] }
|
||||
expected: [1, 4, 2, 3]
|
||||
- input: { head: [1, 2, 3, 4, 5] }
|
||||
expected: [1, 5, 2, 4, 3]
|
||||
hidden:
|
||||
- input: { head: [1] }
|
||||
expected: [1]
|
||||
- input: { head: [1, 2] }
|
||||
expected: [1, 2]
|
||||
- input: { head: [1, 2, 3] }
|
||||
expected: [1, 3, 2]
|
||||
- input: { head: [1, 2, 3, 4, 5, 6] }
|
||||
expected: [1, 6, 2, 5, 3, 4]
|
||||
- input: { head: [1, 2, 3, 4, 5, 6, 7] }
|
||||
expected: [1, 7, 2, 6, 3, 5, 4]
|
||||
|
||||
description: |
|
||||
You are given the head of a singly linked-list. The list can be represented as:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user