ByteDance·Software Engineer·Technical Phone Screen
- Given the head of a linked list, reverse the nodes within each group of even length. The list is split into groups of sizes 1, 2, 3, 4, and so on. Reverse a group if its size is even, leave it alone if odd. The last group might be smaller than expected, but the rule still applies based on its actual size.
“I'd seen linked list reversal before but never with this grouping twist.”