Create reverseNodesinKGroup.cpp