Ad
  • Custom User Avatar

    Why on earth does nobody care to fix this kata? It is WRONG. When you want to beat somebody by one, you need to have ONE more point - not the exact same score, which is what the tests require you to do. PLEASE FIX THIS! Thank you.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Sorry, but this Kata is just weird. I do not understand the description. This is so unlogical and not correct. You can't just come with i and j without saying anthing about them... What is i? What is j?

  • Custom User Avatar

    Obviously you do know the count function - but why don't you also use it to count your duplicates???

  • Custom User Avatar

    How on earth is that a best practice? It cannot get any more complicated... :-)

  • Custom User Avatar

    This is definitely not a best practice.... :-)

  • Custom User Avatar

    I am sorry you feel offended. Not my intention.
    I am a technical guy - and I like precise, good kata descriptions.

    For example: "First let us count the frequency of each lowercase letters in s1 and s2"

    You do know what a frequency is? It is "1/t" or something per time unit. Hz for example is a unit for frequency, meaning "1 per second". In this context, saying to "count the frequency" does not make any sense at all. It is impossible to "count frequency", anywhere in any situation. What you mean is: count the amount each lowercase letter. Time does not play any role here.

  • Custom User Avatar

    Sorry, but who voted this to be a "clever" solution? It is full of DO NOT DO THIS things, repetition, hard to understand code and it is not even short...

  • Custom User Avatar

    I actually do not know which people mark this solution as "best practice". Maybe the author himself?
    This is NOT containing best practice approaches at all, it is actually containing many to be avoided constructs!
    a) always avoid bare loops when there are other possibilities. Looping through all lowercase letters is completely unnecessary.
    b) NEVER EVER use "continue" which is actually the even worse uncle of a goto.
    c) the three concatenated ifs are awfull. Kotlin has a when clause!
    d) do not use map access with !! to disable null checks! There's a reason why get might return null!
    e) filtering chars on a String and then looking at the length simply is counting! So use count {...}!

    All in all, this certainly works - but don't do that!

  • Custom User Avatar

    What an awkward description! It is so unclear und unprecise... this one should get a lot of rework! If you really think, examples "hopefully" make it clearer, please invest in a better problem definition...

  • Custom User Avatar
  • Custom User Avatar

    What is the "multiple number" of an Int?
    Consider clean code principles like good naming...

  • Custom User Avatar

    I sincerely recommend to learn the basics of Kotlin. (and any language)
    "getSum()" for an ArrayList?

    a) Iterable.sum() does that job.

    b) in Kotlin, we do NOT use ArrayList directly.

    c) why do you have a list at all?? All that precious memory for ... nothing.

    Please, return to learning the basics.

  • Custom User Avatar

    "step 1" is completely redundant...
    And why do you go from high to low?

  • Loading more items...