No output for cycle detection

please check my cycleRemove function.Is it correct ??
if yes then why it is printing anythings.

HI @Debugger please save your code on ide.codingblocks.com and share the link here