Ad
  • Custom User Avatar

    Not true. It has a nested loop that is just obfuscated by making it a function. This solution still has O(n^2) time complexity. I am baffled that this solution works when my nearly identical solution kept timing out.

  • Custom User Avatar

    @rowcased congrats and welcome to the wonderful Lisp world!
    Codewars' solver is not broken, but there's definitely a typo in the template solution ("string" -> "strng").

  • Custom User Avatar

    I am a complete noob at this language, meaning I literally just passed this one as my very first Clojure kata (Completed on 1st Attempt:1), yay! (and this language totally mysifies me, just had to do some research) So, no it is not broken.

  • Custom User Avatar

    @akar-0, you are wrong. I was importing it correctly, but the variable in the template code is named "strng" (without "i") for some weird reason, so this was the source of the problem. Thanks for nothing anyway.

  • Custom User Avatar

    You don't use it correctly.

  • Custom User Avatar

    @akar-0 hey, it is not resolved.

  • Custom User Avatar

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

  • Custom User Avatar

    Unclear suggestion (which code validation are you talking about?). Maybe suggest something to your school.

  • Custom User Avatar

    This is not a kata issue: an issue is a bug in the kata, not a difficulty to solve it. I mark your comment with a spoiler flag since it reveals a key to solve the kata. You may need to import something to do what you intent.

  • Custom User Avatar

    I'm trying to solve it with Clojure (and clojure.string/join function), but I'm getting a stacktrace saying "Unable to resolve symbol: string in this context". Is codewars broken?

  • Custom User Avatar

    Are you sure? Your solution uses two nested loops whereas this solution only uses one.
    Let's say n = 1,000,000: this solution reads 1,000,000 numbers whereas you examine at most 1,000,000 ^ 2 pairs.

  • Custom User Avatar

    Nah, too troublesome. Is it some official API for this I could use though?

  • Custom User Avatar

    Use your favorite editor, then copy-paste into Codewars to run the code.

  • Custom User Avatar

    Looks disturbingly similar to my solution :)
    Cheers!

  • Custom User Avatar

    Thanks for your suggestions mate!
    Right now the problem is not the kata I was trying to solve. The problem is I can't use codewars code editor whatsoever - my religion forbids me using something that buggy. (By the way have you tried to hit Ctrl-T while in editor to open the new tab in browser? Try it, it can frustrate even an angel).
    So the question stands: how do I use proper editor to write kata solutions and preferably send it to codewars without leaving it?

  • Loading more items...