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.
but it works, so.
I agree, this author has the best Kata on this site. All his Katas are easy to understand and hard to solve. But it's lot of fun.
Haha xD
Running that input against the built-in solution, it returns false. Perhaps you are reading the error message wrong?
How so?
Duplicate issue. There is another below this saying the same.
It means the input you test aren't exactly the same. Whitespaces are kinda tricky to copy.
Tests with odd numbers are correct, and your initial formula does not handle them correctly.
you are correct. it doesn't do a prime check at all.
maybe suggest better test cases.
Test1 has many more cases in "ATTEMPT" than in "TEST". You could have seen that since you print the input:-) Cheers.
You're making a histogram from a set of data. It's a bar graph of "bins" (ranges) of numbers vs. their frequency in the set. The return value is the heights of the columns in the histogram.
For the data
[1, 1, 0, 1, 3, 2, 6], binWidth = 1
in the example, there is one0
, three1
s, one2
, one3
, no4
s, no5
s and one6
, so the output will be[1, 3, 1, 1, 0, 0, 1]
-- the frequencies of each element for all the possible bins. Each bin just contains a single number.If
binWidth = 2
, each bin covers two numbers. The first bin matches0
and1
, the second2
and3
, and so forth.let's say we have a class of 10 students (data-points) with an average score of 80. if you add one more student with a score of 100 what will the average be?
Look at the table:
Try to follow the steps enough times and you will see that this situation will occur at some point of time.
The test is ok.
That doesn't mean #2 and #3 can't have both their hands raised at the same time. Look how that works with person #1 and #2 in the kata description.
Loading more items...