Not able to find cycle in this input( cycle is expected here)


#1

A : 66
B : [ 36, 53, 1, 12, 16, 2, 21, 8, 57, 37, 19, 33, 33, 19, 30, 18, 6, 63, 46, 23, 42, 13, 22, 32, 9, 9, 36, 46, 63, 66, 28, 58, 31, 43, 44, 15, 45, 54, 50, 64, 16, 51, 54, 17, 60, 8, 22, 6, 32, 12, 7, 40, 50, 13, 29, 3, 42, 58, 20, 52, 26, 28, 49, 13, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 ]
C : [ 17, 64, 30, 48, 41, 57, 56, 65, 47, 23, 15, 66, 37, 41, 59, 45, 4, 4, 34, 2, 62, 51, 24, 20, 3, 11, 43, 39, 56, 34, 9, 47, 65, 14, 35, 10, 27, 31, 5, 24, 38, 5, 53, 10, 38, 55, 35, 39, 26, 38, 14, 52, 27, 25, 55, 40, 28, 59, 18, 7, 21, 29, 8, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]

This is given input. I found for this input there is no cycle for any course from 1 to 66. hence returning 1. but expected answer is 0 which implies there should be a cycle. I tried to find it by debugging but found 0 cycles. For which course we can find cycle here?


#2

resolved. It was because of a silly error


#3

I am facing the same problem ,whats wrong with this cycle finding approach?


#4

i’m facing the same problem please help