algo4: twopointers: Reverse nodes in k-group