Ad
  • Custom User Avatar

    Python: random tests should generate more valid cases to avoid solutions like this

  • Custom User Avatar

    I believe the description is seriously lacking. I had to look up wikipedia and a youtube video, in order to grasp the concept (I may also need some holidays...) However, a few good examples could make it much more comprehensible, e.g.:

    (1, 2, 3, 4, 5, 6),
    (4, 3, 6, 2, 1, 5)  -->  True
    
    because: 1 -> 4, 4 -> 2, 2 -> 3, 3 -> 6, 6 -> 5, 5 -> 1 ; we cycled through all the numbers
    
    
    (1, 2, 3, 4, 5, 6),
    (4, 6, 3, 2, 1, 5)  -->  False
    
    because: 1 -> 4, 4 -> 2, 2 -> 6, 6 -> 5, 5 -> 1 ; we did not cycle through all the numbers