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.
Your solution doesn't account for smileys with a nose, so for example if you got
[';-D']
as input, your solution returns 0 but it should be 1.Fixed for Coffee and Python, I believe that's it. I'm not sure about Haskell though, never did Haskell...
Fixed for javascript, thx for notifying me.
Thanks, glad you enjoyed :)
The solution you posted fails on the last sample test
Test.assertEquals(countSmileys([ ':--D', ';-~)' ]), 0);
. You can print the input withconsole.log()
Well, I don't have any special advice. Just by solving a lot of katas you will become better at it.
Also if you are dealing with numbers like in this kata, it helps writing out the first few results, because then you might notice a pattern.
Great, thanks for the effort :) approved
Thanks for the translation and the info. Unfortunately the Scala translation cannot be merged (got error message: "Description cannot be approved, recent changes from related record must be merged first.") and the author has been inactive for some time now so I guess he wont be able to fork it...
Looks like a birds eye view of a village growing into a city
https://makeagif.com/i/hbBRxz
Well yes, the correct answer is 54. From your picture it looks like you counted correctly for the first two rows, but then you made a mistake.
Looks good now. Thanks Chrono
For some reason I still don't see Julia among available languages for this kata, but I'm sure I approved it...
Sorry for the late response. There are some scenarios in which your solution doesn't work as expected. For example given the arguments
ant([[1, 0, 1], [0, 1, 0], [1, 0, 1]], 0, 0, 1, 1)
, the correct solution would be[[0, 0, 1], [0, 1, 0], [1, 0, 1]]
(n
is one so there is only one iteration and only the element at index0,0
should change, but your function returns[[0, 0, 0], [0, 0, 1], [0, 1, 0], [1, 0, 1]]
. Hope this helps...I have no experience with Julia whatsoever, but I tried to go through the code and it looks fine, so it's approved, thank you for your effort.
I just realized that in the final test suite for javascript union isn't tested at all, only intersection.
Loading more items...