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.
Hi,
I made similar solution, but instead of 'n' as number of rotation, I made n%data.lenght.
As a beginner my question is- does pefrormance improve in that situation? Program does not to f.e 12004 rotations, but has to make a division and get rest of that.
testA are 100 random tests, sqrt is used but not directly when calculating m value in the control function, if it is so important in your code, you'll have to try another way.
Thanks a lot! it will help me much.
What about the testA case? Do you have any suggestion why is the solution of both sqrt the same?
Don't guess the input, print it: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#print-input and you'll have the exact input yourself, your guesses are wrong.
Hey,
I know that there is a lot of people who complited this in Java, but:
I don't understand , why test have some results,namely:
test 14 - expected <-1> , but was <2>
test 15 - expected <-1> , but was <3>
testA - expected <-1> , but was <51156>
Namely:
sqrt of 1712155883321112_517L is 1308493746,00000000000000000000 using big decimal sqrt
sqrt of 1712155883321112_150L is 1308493746,00000000000000000000 using big decimal sqrt as well,
As function sqrt is crucial in my solution, it has bad output. Maybe it is just lack of basic knowledge of mine.
Thanks a lot for that! I am just starting Lambda impressions- this example showed me much :)