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.
No, this is more on the logic analysis and grammar literacy side of things. So, you as an observer are able to identify four types of dinasors and 3 types of food.
Based on these info, you know that both brachiosaurus and the triceratops are herbivores (vegetarians), with an exception that triceratops cannot eat leaves. The same goes for omnivores (T-Rex and velociraptor) cannot eat flowers and leaves.
So, if such an exception happens, you replace the dinosaur with Something as it would not make sense to say a herbivore is eating a dead dino or an omnivore is eating plants.
However, for the case of
vvvvvvvvvvv
, you are able to identify the dinosaur beingvelociraptor
, just not what he is eating on. So, your statement of sayingA velociraptor is eating something
is entirely true, hence you do not need to replaceA velociraptor
withSomething
. Hope it makes sense ^^The Kata is asking for the possible combinations of one red and two blues, but ONLY cares about the position of the red.
The rules of this kata (and its testing) seem to be inconsistent to me. According to the description, if a known dinosaur [bitemark] is eating an item that it should not be eating or eating an unidentifiable item then the return statement should be "Something is eating xxxxx".
From the desc: lunchTime("|||uuVuu|||") // => "Something is eating leaves."
Yet the test expects that "vvvvvvvvvvv" should be "A velociraptor is eating something."
Why isn't it "Something is eating something"?
Otherwise shouldn't the example in the description be //=> "A triceratops is eating something"?
I'm finding two of the sample tests a bit confusing in how they seem to be calculating the possibilities differently.
If ['red','blue','blue','red'] results in 2 possibilities, how is ['blue','red','blue','blue','red','blue','red'] resulting in 2 and not more possibilities?
In the second array, I can form: "blue red blue", "red blue blue", "blue blue red", "blue red blue" ==> 4 possibilities.
Isn't the Kata asking for the possible number of combinations of one red and two blues? Or is it that each combination has to be unique?
Would appreciate some clarification.
Might want to include in your description that a string could include whitespace and/or special character(s).
Thx. I will update.
But some readers might still easily mis-read the examples. Like I did. After submitting my code and getting errors, I even thought, "oh this must be a mistake--on the kata sensei's part." I had to go back to re-read the description/examples.
One could make the case that altering the description slightly doesn't make that much of a difference. But, I definitely recommend updating the example.
Instead of: "-- Normal reversal without spaces is "edocruo". "
It should actually say: "-- Normal reversal is "edoc ruo". " (Then followed by the correct reversal example.)
The examples given are an important part of the description. You don't think they suffice?
The kata description could use a slight modification for improved clarity.
"...we are going to reverse a string while maintaining spaces..." can easily be misread as keeping the spaces after each string is reversed, when what is actually meant is to keep the "positioning" (or index order) of the spaces.
I recommend updating the description.
I was able to solve this kata, but I have to agree with previous comments below that this kata could use clearer instructions.
The condition that would trigger "Something Bad" or "Something Good" (in the random test cases) is not well-described at all. After passing the sample tests then running into errors with the random cases, I read and re-read the instructions multiple times without clear insight available. Eventually after looking for a pattern in the failed tests, I had to take a wild guess at what I suspected/assumed the author might be asking for. #UXfail.
Another instance of unclear writing: "If there are multiple challenges with the highest toughest amount, the first one presented will be the toughest." Does the instruction mean to say "multiple challenges with the SAME highest amount of licks"? Big difference because going by the given instruction then the outcome for "totalLicks({"dragons": 100, "evil wizards": 110, "trolls": 50})" would be "dragons" because it's the "first one presented".
This kata shouldn't be difficult to complete, but unclear instructions will make it a frustrating one to solve for some users.
Agreed! At least a 5kyu. Uff....
the error was parsing your code. You should not use function keyword since it's a ES6 class if you want to use ES5 version you should use this template to do the same:
Would be good to know if/when this is fixed/resolved.
As for testing the structure vs extracting the url, the match method returns an array with the pattern as the first element, hence my solution.
Loading more items...