is_cycle is a boolean function. is_cycle takes a list as argument. is_cycle returns 1 if the argument is a cycle and returns 0 if the argument is not a cycle. Input :
Output :
Input :