Ad
  • Custom User Avatar

    I considered the "case sensitive" part and do it that method for strings in consequence so it considers same letter and still fails for me...

  • Custom User Avatar

    I wouldn't wait an answer like this from you :) But i laughed thanks.

  • Custom User Avatar

    Because it's not his kata, it's g964's kata. You need to convince g964 to change the description to something better.

  • Custom User Avatar

    @Chrono79 Why not just clearly state the rule behind the sentence "sorting those numbers as string", which is quite cryptic to be honest (eg. "you must order each string as the sum of the ASCII values of its chars" OR "you must order each string by its length", etc...).

    From your example I think the rule is "order the numbers by the decimal of its chars"

    So if we have "91 18 72 36 92" it should be sorted like this "18 36 72 91 92" because 1 in "18" < 3 in "36" < 7 in "72" < 9 in "91" and 1 in "91" < 2 in "92".

    Does this seems correct to you ?

  • Custom User Avatar

    it's called ternary operator. it's syntax is:
    (a condition) ? (statement 1) : (statement 2);
    if (a condition) is true, then statement 1 works. else, statement 2 works.
    it is like if, else statement. it could be written like this:

    if(a condition)
    {
    statement 1;
    }

    else
    {
    statement 2;
    }

  • Custom User Avatar

    i didn't understand the description. "team's action" means what? how can you decide which team will win? could somebody help me.

  • Custom User Avatar

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

  • Custom User Avatar

    i have solved this kata in c# and test doesn't check for a string. it checks for IEnumerable so you don't have to make a cast. i think you couldn't understand the kata very well.
    the kata says "returns a list of items without any elements with the same value NEXT TO EACH OTHER ". you gave attention to it, right?
    all i say is nothing wrong with tests so you would want to try to solve the kata again.

  • Custom User Avatar

    easy peasy this solution is squeezy

  • Custom User Avatar

    Will you stop complaining and:

    • Ignore g964's katas, there are a lot more katas to solve you know?
    • Propose a better description?

    About your question, see this other example:
    "9 18 72 36"

    • sorting those numbers of the same weight ascending as numbers "9 18 36 72"
    • sorting those numbers of the same weight ascending as strings "18 36 72 9"
  • Custom User Avatar

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

  • Custom User Avatar

    ahah clever solution. i liked it.

  • Custom User Avatar

    again g964 and again bad kata explanation. really, enough!

  • Custom User Avatar
  • Custom User Avatar

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

  • Loading more items...