feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent 98ebb1600f
commit 16b02451d0
94 changed files with 1840 additions and 0 deletions

View File

@@ -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: