complete reverse-nodes-in-k-group/ by iterate