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.
I understood nothing about the problem at all. What is availableweekdays ? No wonder I do not understand any of the solutions. I did not get the problem statement itself.
Wow ! I wonder if this solution would come to someone's mind if the tests were not visible.
I mean he could have just constructed a new array with the length of 100 and added 1 to each element to get up to 100 and then used the reduce method, but as you can probaly already tell that's way more work than just hard-coding the 5050. I did something similar in my code
What do you call "pre" here ? I see this is a reverse take on the accumulator in
reduce
.why is this best practice if the sum 5050 is hard coded ? isn't a more general solution wherein the sum for the first 100 positive integers 0 included is calculated first the way to do it ?
the manager has an increment waiting for you for delivering such understandable code .
Your code already gets IndexOutOfBoundsException. When I fix this it fails for two-digit numbers.
You should read the description again on how the rotations should be applied. Your algorithm rotates the whole number and that is not what is asked for here.
I am getting this error
For n = 38458215: 84582153 should equal 85821534
For n = 195881031: 958810311 should equal 988103115
for first 2 test cases
that next two test cases are passed my logic was to store each rotation in the rotations list to keep track of all the numbers generated.
always tend to get stuck on katas by g964 so much so that everytime i see their question , I go - 'argh, here we go again' . great exercise for the gray matter :D
This comment is hidden because it contains spoiler information about the solution
A
А
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...