Ad
  • Custom User Avatar

    Ok. I think that it is a problem that the test suite outputs horrendeous amounts of crap if one of the big tests fail and I'm not sure how to solve this so that it is possible to figure out what tests are failing.

  • Custom User Avatar

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

  • Custom User Avatar

    I'm having some problems with the build server. I've optimized in several iterations and have reached a point where I beleive my code is efficient enough, but I keep getting these stupid problems with the builds (only the "Attempt" builds, the "Run Examples" works fine).

    Sometimes it complains about JSON errors, sometimes I get HTTP 500, and currently I'm stuck with "Failed to process output. It is possible that too much data was written to STDOUT." even though I don't write anything at all to stdout.

    I think that the tests might be a bit on the heavy side for the servers, what do you think?

  • Custom User Avatar

    Dude please don't use std::list. It is incredibly slow and useless.

  • Custom User Avatar

    I found the description somewhat confusing. Lots of words not describing the ultimate goal for the kata. I suggest to shorten it and make it more algorithmic. Something like:

    • Make an algorithm that sorts according to blabla, for this and that reason (motivation)
    • Make one pass i = [0...n-1] on words X = [X[0],...,X[n]]
    • If X[i] < X[i+1] and i is odd, swap
    • If X[i] > X[i+1] and i is even, swap (or whatever the order was)

    But there might have been a reason to be vague in order to make the problem harder, in that case i think it would make sense to give some motivation so that it is possible to get an idea about the problem domain and what exactly we are solving.

  • Custom User Avatar

    Yes indeed, elixir version messed up. The tests are not checking against a string

  • Custom User Avatar

    I can't figure out how to review :P

  • Custom User Avatar
  • Custom User Avatar

    Lol my first silly Elixir attempt

  • Custom User Avatar

    (Elixir) I've tried the recursive solution and that one runs out of time with very large numbers, I've also tried the factorial solution and that one has rounding errors with very large numbers. Not sure what to do now, some hint in the problem description would be suitable since this is a 7kyu.

  • Custom User Avatar

    Description is messed up for the C++ version

  • Custom User Avatar
  • 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

    If you benchmark your map solution with one that scans the whole range you will see that it takes an incredible amount of items for your solution to be faster, not sure millions is enough.

    std::map is the worst container in the language, next to std::list (std::map uses std::list in its implementation). Scanning a contiguous segment of memory is cache friendly and about 300 times faster (depending on the CPU) than a memory lookup. Not to mention all the dynamic memory allocations you force with your implementation.

    I just might provide you with some performance benchmarks to prove my point.

  • Loading more items...