Add iterative solution to reverse nodes in K groups