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.
yes
Approved by 🧙
isnt it because you use
Math.round()
instead ofMath.floor()
for the mantissa ?reference solution sometimes gives incorrect result:
input : 107.88354150716061: expected '010000101101011111000100011' to equal '010000101101011111000100010'
input : 925.3339639566982: expected '010001000110011101010101011' to equal '010001000110011101010101010'
I think random number should be rounded to 6 or 7 digits first. Reference solution could be build on DataView or on other solution.
Thanks :)
added random tests
can you update it to
3.0
?As I did :(
Looks like you've solved it
Thank you. It's working now
You mean the argument? Some languages do not allow uppercase letters for variable names. In JS,
N
seems to be applicable; in other languages,n
might be applicable.Just read over it. CodeWars supports multiple languages, and sometimes this stuff happens.
If it offends you that references to other languages seep through in JS descriptions, do a couple of Haskell kata. Concepts that are different are quite often left untranslated.
fixed
fixed
removed
Glad to know that the problems are solved.
I wrote a code to test if there is any char w/o any same char neigbhours, while there is more than one this char in a map.
It went through two million random maps, and did not found any. If I remove the limitation of "more than one char in one map", many results were printed since some territories have only one char on a map. I guess what you saw was this single char scenario. :)
But it seems JS test code runs differently here and there. It's beyond my knowledge of JS :(
PS: node on my computer is 10
Loading more items...