• A little bit more than 6kyu ;) (needs a good+ level in maths and good skills to code the thing)

  • !help
    what does:
    from solution import e
    .
    .
    actual = e(n) <- this line

    actually means and do ?

  • Should have read more move history, this is just monadius' solution again.

  • 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
    
  • I guess we can considere this one resolved

  • Thank you for your concern :) You would be heartbroken wouldnt you :P

  • Thanks for completing my kata! Yes you are correct, I just updated the description so hopefully there is no confusion.

  • Up => the longer you wait, the more down votes your kata gets. That could make it unapprovable for a very long time... That'd be... "sad".

  • There are two defintion on wikipedia, I think you mean this one:

    Cyclic permutations are those permutations which consist of one nontrivial cycle (that is, no fixed points allowed).
    

    and adding an image won't hurt:

    by adding this you can emphasize that you are not considering this(vv) as valid cyclic permutation in this kata:

  • Good point, I have been convinced by Blind4Basics, I will update the description in a bit :)

  • well, I focused on its first sentence, but you surely felt the next part a bit harsh... x)

    Let's try another way: could you tell me why precisely you don't want to add only something like this:

    • the user needs to find if the input is matching aa single full cyclic permutation (note: the "full" aspect doesn't show up in your answer above while it's what the implementation is asking for)
    • the input is the two lines notation, meaning that the the permutation of the n nodes are done following this scheme: the ith node of the first tuple is directed to/taking the place of the ith node of the second tuple.

    that's roughly all that you need to add (with a better wording).

    So...? Just "why!?" ;)

    edit: looks like I misunderstood your last answer... x) Well...

  • @logiczsniper

    This is from your third link:

    A permutation is called a cyclic permutation if and only if it has a single nontrivial cycle (a cycle of length > 1).[1]
    For example, the permutation, written in two-line (in two ways) and also cycle notations,
    ( 1 4 6 8 3 7 2 5 )
    ( 4 6 8 3 7 1 2 5 ) = ( 1 4 6 8 3 7 ) ( 2 ) ( 5 )
    is a six-cycle; its cycle diagram is shown at right.
    Some authors restrict the definition to only those permutations which consist of one nontrivial cycle (that is, no fixed points allowed).[2]

    There are two different definitions. The main definition allows fixed points, and the example has tho fixed points.
    How can we know that you use the second definition ("Some authors...") ?

  • Loading more items...