rewrite leetcode reverse nodes in k group