My code gives output 1 even if a cycle is not present

code- https://ide.codingblocks.com/s/314807

1 Like