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.
C++: 500000 random tests are too many and should be redesigned with a higher probability to expect
true
.C++: Failed tests should display the input.
The reference solution doesn't properly handle cases like the following, which are not possible to cover:
Changing the kata to require handling this would up the difficulty quite a bit, so it may be better to ensure these cases aren't generated in the random tests and acknowledge that they won't occur in the description.
advise:
random_pos in your_set
Prime number-check and happy number-check are not novel kata ideas.
I must have missed something. How can the status be a negative? The lowest position a number can have is 0, and the lowest amount of element that is less than that number is also 0. Which means, the lowest status must be (0 + 0) = 0.
Trying to understand how the formula works logically in the example:
Any errors here? Or it's just less accurate than the formula?
Python Translation!
Im new to python, so if anything is wrong LMK and I will fix it
"Turn math formula into a program" is neither novel nor interesting kata idea.
Values should be compared for approximate equality.
Counting words and doing some integer operations is not a novel idea.
Being an 8kyu is not an excuse for a duplicate.
Duplicate as pointed out below.
I think there is a bug in the random tests. I have the following array
which my algorithm sorts to
The test fails with
arrays first differed at element [14]; expected:<[sfqt]> but was:<[ai]>
butai
is8
andsfqt
is1851619
, soai
has to be beforesfqt
because of rule 2 (1851619
is not a prime).Needs random tests.
Duplicate of all
if-else
katas.Loading more items...