Ad
  • Custom User Avatar

    I can't remember already. Maybe I wanted to show how short I can solve this kata, but such short solution was not fast enough, therefore I redirected part of the tests to the faster version of the solution.
    If I wrote 666 (just like a cool number), the short solution would be used too rarely, but I wanted it to be the main one, therefore I just added one more '6', so that only the most complex tests would be redirected to the FAST version.

    Denis Nekrasov, I think it will be easier for you to read this in russian: =)

    Я уже не помню. Наверное, я хотел показать, как коротко я могу решить эту ката, но такое короткое решение было недостаточно быстрым, поэтому часть тестов я перенаправлял на быстрое решение.
    Если бы я написал 666 (просто красивое число), короткое решение использовалось бы слишком редко, а я хотел, чтобы оно было основным, поэтому я просто дописал ещё одну шестёрку, чтобы только самые сложные тесты перенаправлялись на FAST версию.

  • Custom User Avatar

    Hi!
    Why exactly the number 6666 ?

  • Custom User Avatar

    How can I provide random test data?

  • Custom User Avatar

    The issue which was raised isn't entirely resolved, there are still no random tests.

  • Custom User Avatar

    @B1ts he means "A positive integer with no leading zeros and a difference of at least two between adjacent digits is called a yuyuggg number.". For example, 24 is a yuyuggg number since the absolute value of (2-4) is 2, which is bigger or equal to 2 mentioned in description, while 34 is not. For edge cases, a number with a single digit is also a yuyuggg number.

  • Custom User Avatar

    I've checked my code and found that there is a bit of a bug. Thank you for your reminder, I will correct my data and provide better Kata

    Before

    0b7PLq.png

    After

    0b7KyR.png

  • Custom User Avatar

    I have modifyied the Description and please make sure you understand.

  • Custom User Avatar

    a difference of at least two adjacent numbers

    Can you explain this part? Also, you really should have at least 1 simple example showing a small list of yu numbers.

  • Custom User Avatar

    Digital dynamic programming is the key algorithm of solving this problem

  • Custom User Avatar

    I'm sorry. I'll pay attention on these problems

  • Custom User Avatar

    I don't understand the task.
    Can you provide some additional information about yuyuggg's numbers?
    Or provide more examples

  • Custom User Avatar

    The reversing part is doubled-up to account for reversing the final word.

    But if you rearrange things a bit you can avoid the copy/paste.

  • Custom User Avatar

    If you are referring to *(s-1) = 0, that is just setting null terminator on buffer pointed at by ps

  • Default User Avatar

    may I ask why dose the s point to null when the for loop ended? I thought it was not supposed to be destroyed until the function end.....

  • Default User Avatar

    It's bad solution to calculate sum(...) in each "for" loop

  • Loading more items...