Ad
  • Default User Avatar

    @VictorCervantes, try now :)

  • Default User Avatar
  • Default User Avatar

    @Blind4Basics: Avoiding "needless effort" and "crossing the desert the smart way" are hints leading to shortest path. If you want to remove just side by side W<->E or S<->N, you need a different story behind. Would you voluntarily go in circles being in the desert? And why I have prioritized the desert story above the reduction rules? Because I liked the desert story more. People are claiming inconsistence of the story and rules for years. Just read more of discourse to this kata.

    @Voile: Yes, but this can happen only if you are starting on one of the two earth poles. And there are no deserts around the poles :) So there is no desert where this pole anomaly is a common sense. BTW, you don't need to go south 1/4 circumference of the earth, it works for all distances. You can try, for example, going south 10 meters, east 10 meters and north 10 meters and you are back on the (north) pole :)

  • Default User Avatar

    Interesting problem with uncomplete and contradictory description. Why should anyone striving to spare his effort and water go north, west, south and east? But it is not so easy to prepare a good description as there are several caveats. For example [east, west, south, east, north] should result in just [east] and not in [south, east and north]. But on the other hand, a closed path can not be reduced so simply, because, for example, [west, south, east, north, north, west, south] can be reduced to [west] whereas the last three [north, east, south] cannot be reduced to [west].

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Should not be forked from here as it is not about being smart (and smarter) with Python complex numbers.

  • Default User Avatar