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.
It's like saying that
.
is used for full-stops and shouldn't be used for dot balls in this kata. So just think I'm re-inventing the>
symbol.Yes, unsuprisingly the
>
symbol does indeed mean "greater than." Combined with this sentence from the description:It's pretty clear to see that
>
means "This planet is greater than the one on its left"And it's no different in this case. No. Different. In. This. Case.
Mercury > Asteroid
Learn this please."So for a list like ["Asteroid", "Mercury"], the resulting array [">"] means "Mercury is greater than the item on the left","
Bro, stop it, please. We're always use this symbol as index from bigger object to smaller. From. bigger. to. smaller. object. Learn this please.
This kata required inverted result. Period.
It makes more sense when you consider that the return value is an array which represents the relative size of each planet compared to the one on its left. So for a list like
["Asteroid", "Mercury"]
, the resulting array[">"]
means "Mercury is greater than the item on the left", which is why the greater than symbol is used. In the end, though, I don't think one way is less confusing than the other. Your list of pairs to compare could easily be reversed:Asteroid and Mars, Venus and Asteroid, Jupiter and Venus, Asteroid and Jupiter, Earth and Asteroid, Pluto and Earth.
-- they are the exact same comparisons, but now the greater/less than signs are reversed. I think it only makes more sense to you in the way that you described because your list of comparisons exactly follows the order of the items in the original array.