Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
@Voile @Blind4Basics Perhaps I'm just a 'newbie' with no 'common' sence, but surely the purpose of the story is to aid understanding and not cause confusion and misunderstanding.
But perhaps you think I'm wrong?
If so, then why don't we create kata with purposefully misleading and contradictory stories? After all the description would "technically" be correct!
Heck, why stop at confusing kata?
Why don't we give all the questions in programming classes and textbooks misleading stories too? Perhaps it would teach "newbies to coding"
some "common sence"!?
And what if english is your second language? Surely we should give our international coders some consideration. After all, we have a moral duty to aid accessability and not misslead them.
Do we come to CodeWars for a linguistic battle? To filter through murky descriptions? To strech our reading and comprehension skills?
No! We come here for a technical challenge. To polish our coding skills; not our english.
Therefore the stories should serve (Not detract from) the problem.
Ok
@VictorCervantes, try now :)
Nice and clear.
There was no "random crate" when @White-Oak translated and now it is gone from CW since long!
That'd mean most of us are aliens. I'm not sure if that's a better news ;-)
@Voile. Ah, you assumed Earth. But Kata description does not say it is Earth.
The second test in Rust is
[NORTH, WEST, SOUTH, EAST]
, it's not the same as in the description ;-)Rust version has no random tests.
or again, just make the difference between the story and the actual description of the task you have to handle. I agree that the description isn't perfect, but well... you have examples, precise explanations and all. Just read.
@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 :)
It seems that Rust tests are broken. The second example require returning 4 steps (same as input) while in contents of kata, expected return is
[]
.People seem to have forget that the earth is a sphere (is everyone flat earthers all along?) which has curvature, so you can't just cancel directions like on a flat plane: e.g from North Pole, walk south 1/4 circumference of the earth, then east the same amount, then north the same amount, you'd actually end up at the North Pole again.
Sometimes I wonder if being newbie to coding would make one forget common sense. This comment section never fails to make me think it's true.
or you just actually read the description, meaning: without interpreting it...:
Where did you see that you're searching for the shortest path?
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].
Loading more items...