Editorial for Joro the Rabbit

Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.

Submitting an official solution before solving the problem yourself is a bannable offence.
by: doncho

Solution in pseudo code

for start_position in range(length):
    for step in range(1, length + 1):
        position = start_position

        while position not in used:
            next_position = (position + step) % length
            if field[next_position] <= field[position]:

            position = next_position

        best_length = max(best_length, len(used))


There are no comments at the moment.