Ad
  • Custom User Avatar

    I'm surprised that thid was got approved because mine seems to be duplicated.

    When I was thinking about writing this kata I couldn't find any similar kata.

  • Custom User Avatar

    I'm not sure y this one got approved, but it looks very similar to this (I'm also not sure why I did not think about this kata being a dup back then, && even gave it a green vote ughhh...... )

  • Custom User Avatar

    It should be infinite, in other words - endless, limitless, illimitable, unending, unceasing, perpetual.
    So never ending but within a time limit (12 seconds).

  • Custom User Avatar

    This is a new kind of task - you need to optimize server side code ^_^

  • Custom User Avatar

    The description doesn't say that there may be recursive callbacks.
    It's better if you note it there.

    Becase I wrote a piece of code that calls the fourth argument in the beginning, therefore causing "Maximum call stack size exceeded" error.

  • Custom User Avatar

    The same solution as Xom9lk's is and unrelated as well but I still like it ^_^

  • Custom User Avatar

    I'm not arguing with your solutions, it tricked me in the first glance, so notice for everyone else:

    Such function only applies caching to a current call.
    It means if the function takes 7 seconds to complete, calling it 3 times, in total, will take 21 seconds.

  • Custom User Avatar

    Reasonable. Added.

  • Custom User Avatar

    Mmm... Yeah, you're right. Fixed the headings, description and the conflict.

  • Custom User Avatar

    I suggest an additional test for a scenario where the template contains no # characters:

    (112, "+( )") => "+( )"
    
  • Custom User Avatar

    IMHO this line in description:

    You don't need to worry about validating numbers, they always have appropriate form.

    conflicts with the lines that follow:

    if there are digits in a number that can't be formated, they should be skipped.

    if there are less digits than needed, should return "Invalid phone number"

    It states that I don't have to validate numbers, and then goes on talking how to deal with numbers that don't fit the pattern, which essentially is a validation logic.

    It's also confusing to me what does "digits in a number that can't be formated" mean and how one is supposed to skip them.

    I suggest rewriting the description as follows:

    You're given phone number and template by which it should be formated.

    • If there are more digits than needed, they should be ignored.
    • If there are less digits than needed, return "Invalid phone number".

    Also, the title "Introduction" doesn't make sense when it's followed by the whole description of the problem.

  • Custom User Avatar

    The initial object should be affected too, as it's said in the description

  • Custom User Avatar

    Do you still need it?

  • Custom User Avatar

    Even though I fixed it

  • Custom User Avatar
  • Loading more items...