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.
my favourite solution so far. Concise but still super readable
I like your answer.it is easy to understand.
This is a fantastic problem. Enjoyed solving this :D
WTF ?!
This is a very risky idea for a kata: easy to solve (with built-in random generators provided by standard libraries), and very difficult to test (testing for randomness id not an easy task).
iirc, such idea has been done before ~~ feel free to come to discord for a better / quicker response !
I have an idea for a kata. But not sure how to code the tests. You have to define a function which will return either Heads or Tails. But the function must be rigged i.e
it must retun Heads 60% of the time.
That's because your code is wrong. You need to improve it.
There are some random test cases. They differ every time. So that's why you get different numbers of passed tests.
This comment is hidden because it contains spoiler information about the solution
Please read this paragraph: https://docs.codewars.com/training/troubleshooting#kata-bug
Then please read this paragraph: https://docs.codewars.com/training/troubleshooting#timeout
Resolving as not a kata issue. It's most probably a problem with your solution.
Not able to submit, time out.
Please mark your posts as having spoiler content next time.
This comment is hidden because it contains spoiler information about the solution
Yes, it can. Your solution has complexity of O(n^2), and is more or less equivalent to a loop nested in a loop because
count
goes through whole array every time.The kata can be solved in O(n), since it's enough to iterate over the array only once to solve it.
This comment is hidden because it contains spoiler information about the solution