• Custom User Avatar

    I'll say, but keep in mind that this approach is more concise and efficient than your method, especially for larger numbers.

  • Custom User Avatar

    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.

  • Custom User Avatar

    8**7 = 2' 097' 152. And this is already more than the amount you mentioned.

  • Custom User Avatar

    The description is clear about its purpose. Your comment adds no additional information.

    Sudoku players often use pencil marks to visualise all remaining candidates for each sudoku cell. In this kata we'll be focusing on drawing pencil marks for any given sudoku board. We can use this visualisation for upcoming kata's concerning sudoku strategies.

  • Custom User Avatar

    Why for use lodash here? idk

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    It is correct, you can check it for yourself by calculating it using calculator or by hand

    4^3 =      64
    6^4 =    1296
    2^5 =      32
    8^6 =  262144
    8^7 = 2097152
          _______ +
        = 2360688
    
  • Custom User Avatar

    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

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Literally, since the variable is iterable, it is never a number.

  • Loading more items...