Thread-Safe Linked List Task Queue Transformation (Linked List + Concurrency Discussion)

Asked at Anthropic · Coding Questions · Difficulty: Hard

Perform a batch transformation: split the list into consecutive groups of size `k` and reverse nodes within each group. If the last group has fewer than `k` nodes, keep it unchanged.

Loading the problem…