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.
Without specifics, this issue is useless. Please provide language and specific test cases. Closing.
4^2 + 9^2
Whoooooa. Thorough
I know how to return arr.name, but why doesnt it work when there is a return in the constructor?(i commented it out)
Imagine a spiral staircase, where walking [n, w, s, e] will result in going up (or down) the stairs. But walking [n, s, e, w] in that order will result in staying put.
Anyway, better to follow the problem spec than to complain about it.
What is the use of the model?
NVM I DONT READ THIS> I THOUGHT NUMBERS WOULD ONLY BE ! AWAY FROM EACHOTHER
Thx now i can see them again, but it expects there to be like 888 or 900 consec numbers needed for some arrays, and when i print the array length, only 100 or so numbers are in the array.
I removed a section of code that was valid before codewars upgraded. Should be fixed now. Thanks for reporting it.
Try again guys.
Ditto! I pass the trial. Then when I submit it says I pass 52 tests and fail 52 tests. But it won't show me the test results, so I don't know what is wrong. I am programming in javascript and assuming that the array contains only unique numbers, etc.
For me, Javascript
Which language?
Same here! I'm getting 52/51, still don't know why!
the random test cases dont appear to show up when submited so i cant see what i get wrong. i pass 4/104 tests but i dont know why.
Maybe its my bad internet aka frontier that makes this happen
in javascipt, i pass 23/50. The huge grids like 240 and 32 are just waaay too difficult for me to visualize at the moment. nice kata tho.
but pls help me visulize it better. here is how i visulize it:
take the smaller value(take length if its smaller or width if its smaller), and subtract it from the other. so if you have 20 and 14, you take 14 away from 20, so you have 6.
What this does is take away a 14x14 part of the rectangle so ur left with a 14x6 part of it.
now time to subtract 6 from 14 so you get a 6x8 rectangle
so now:
can you do a 7*7 square? no because 7 is greater than 6, and wont fit inside the rectangle.
howbout a 6x6? yes, because a 6x6 can fit in a 6x8. so now subtract 6 from the 8 so u have a 6x2 rectangle.
can a 6x6 still fit in a 6x2? no
can a 5x5 fit?no. A 4x4? no. A 3x3? no
a 2x2? yes. Now will a 2x2 fit in a 6x2 still? yes. subtract 2 from 6. now its 4x2. can a 2x2 still fit? yes. now you are left witha 2x2. obviously 1 more 2x2 can fit.
What can i improve in my visualization??? thx
Loading more items...