Ad
  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    Why O(n) doesn't fast enough?

  • Default User Avatar

    For most katas, may be. But there are katas with certain demands to the code itself. Maybe I just overthought it. Anyway - there is a mistake in the placeholder.
    UPD: I managed to put the solution between 'return string' and ';', so it is possible to solve without changing the placeholder, thus the task is correct, but a bit tricky.

  • Default User Avatar

    This:
    class Kata {
    static String alternateCase(final String string) {
    return string;
    }
    }
    UPD: However, I've made some research and learned something from this, so it's not in vain.

  • Default User Avatar

    Java
    Given is the final String and the same String to return. So, accoring to the task, we have to mutate given string.
    I didn't find the way how to do that and looked at the solutions. All of them return another Strings. And they are considered done!

    It's so frustrating.

    Question to the author: How to mutate final String in Java if Strings are initially immutable?

  • Default User Avatar

    I forgot to delete the row reverseRoute[0] = "Begin " + arr[arr.length-1].split(" ", 2)[1]; so I initialized reverseRoute[0] twice. I'm not sure whether there is an option to edit solution or only add an alternative.

  • Default User Avatar

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

  • Default User Avatar

    I havent troubles - my solution accidentally passed tests.
    ty for "abs" remark. Squaring gives positive result anyway.
    UPD:
    my result 9.055385138137417
    in example 9.05538513814
    my result 10.295630140987
    in example 10.295630141

    I should have been more careful. Sorry.

  • Default User Avatar

    Math.hypot(Math.abs(x1-x2), Math.abs(y1-y2)) returns slightly different values from explanation values. How the author calculated distances? And which method is right?

  • Default User Avatar

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