In a plain full reversal prev starts null, because the old head really does become the end of the list. Here the group's old front becomes that group's tail and has to point at whatever follows it, so prev is seeded with probe and the join happens as part of the reversal itself, leaving the list walkable end to end after every group. The loop also repairs that same link on the next pass, with tail.next = prev for a full group or tail?.next = start for a short one, so either mechanism on its own would be enough. The bug is having neither: copy the plain reversal, start prev at null and drop the repair, and the list ends after the first k nodes with everything past them unreachable.