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.
You are right. I know you are not supposed to 'invent the wheel again' but this exercise is great to learn algorithmic thinking and complex concepts like recursion.
8**7 = 2' 097' 152. And this is already more than the amount you mentioned.
The description is clear about its purpose. Your comment adds no additional information.
Why for use lodash here? idk
Sudoku is a pretext. The problem related to sudoku is solved in a few minutes, while giving the specific format to the string that is requested as output is a headache.
If you don't feel like dealing with strings, I don't recommend this kata.
Please mark all your explanations as spoilers because they can be seen on the front page even for people who didn't solve the kata yet.
This comment is hidden because it contains spoiler information about the solution
It is interesting that this solution has no more comments. I found a very unique way to arrive at the solution due to the specific conditions of the problem. If the conditions were a little different, this solution would no longer work. It helped me a lot to study bit-by-bit operators, so thank you very much.
This comment is hidden because it contains spoiler information about the solution
It is correct, you can check it for yourself by calculating it using calculator or by hand
There is an error in the examples in the description:
n = 46288; p = 3 ---> 51 since 4³ + 6⁴+ 2⁵ + 8⁶ + 8⁷ = 2360688 = 46288 * 51
but 4³ + 6⁴+ 2⁵ + 8⁶ + 8⁷ = 263,592 So k=51 is wrong
I think it would have been better if you had tried to get to the algorithm properly. You would have learned more. Using the solution is good when you already know how to get to the solution.
A little disappointing to see that there is already a solution to the problem. Surely that function uses the same algorithms that we are supposed to write. But using this solution takes away all the fun from the problem. It's literally like writing a "hello world." The only value of the kata itself is having discovered that this function exists, I guess.
Literally, since the variable is iterable, it is never a number.
Humm? Is not your own solution read through the string a lot mor of times? doing a cicle for you are reading the string mor than once for each character.