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.
First try to bf the result for 10/100/1000/10000/100000. Then analyse each and every result and find out the connection between them. This is the way i've solve it but it took me 2-3 hours. No higher math or 'magic' formula is needed. Good Luck.
I feel like this kata is more about time complexity than it's about the problem solving, I solved it fairly easy to pass cases with small amount of numbers but can't figure out a solution that doesn't time out for the life of me. I've tried learning some about numpy to try to use vectoring but I'm struggling a lot. Anyone can let me know if I'm on the right track or am I looking in the wrong place. Thank you!
My mistake , Thanks a lot bro
Just looking by eye, can't you see that there are 2
0
in first array and only 10
in second array? So it should returnFalse
.The kata has been solved 70,000+ times, the tests are almost surely fine by now.
I am using javaScript , look to this test
[9, 0, 6, 0, 1, 2, 5, 10, 9, 7, 4] , [100, 49, 1, 81, 81, 4, 0, 36, 25, 1, 16]
According to the question, this test is supposed to return true
But instead it returns false ..
My code passed more than 208 Test !
This comment is hidden because it contains spoiler information about the solution
which language are you using?
if you say that tests are not accurate, you need to provide an example of why they are not ;)
you can log the input to the console using the
print
functionI think the tests are not accurate
Passing all tests including 100 out of 100 randoms except fixed test number 10 in python. Any way to access the information with the fixed tests so I can debug and see why that one test is failing? or is there something up with that test in particular.
It's an array of a single character which holds the amount of vowels.
For some reason.
God knows why they didn't just give a variable but you know, it doesn't matter.
How would not having a loop account for different input?
you're probably printing the answer instead of returning it
means that your function returned
"() - "
when the answer is"(123) 456-7890"
I'm getting error
Actual: "() - "
Expected: "(123) 456-7890"
but when put into a codespace on github and adding a print statement i get the expected answer returned.
nb_vowels
is the number of vowels. You need to report the number of vowels into it.Loading more items...