Ad
  • Default User Avatar

    JavaScript:

    • no sample tests
    • no random tests
    • mocha + chai should be used
    • classes should be used
  • Custom User Avatar

    as much as I read, I don't understand lol

  • Custom User Avatar

    I tried to solve this in Rust. It's not that hard, but it pigeonholes you so hard into a bad design that exposes internals and has a bad memory layout, all of which I was trying to avoid. After a lot of trying to work around the bad design, I passed the local tests, but I was unable to pass the real tests due to the repeated use of design implementation internals that should not have been relied on. Even beyond that, pretty much everything you're being told is a requirement is non-idiomatic Rust: to_vec instead of implementing the From/Into trait, custom map and filter instead of implementing the IntoIter and Iterable traits, custom from_iter instead of implementing the FromIterator trait.

    If all of that ever gets fixed, I'd love to try this again. Peace ✌🏻

  • Custom User Avatar

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

  • Custom User Avatar

    I have trouble with one random test :

    89953 922317
    which is supposed to output 4
    I don't see how it can be, I find 5 when I run it by hand. It would be 4 if the carry was not counted in one of the operation which would be incorrect.

    log of the operations :

    3 7 +1
    carryValue 1
    carries 1

    5 1
    carryValue 0
    carries 1

    9 3 +1
    carryValue 1
    carries 2

    9 2 +1
    carryValue 1
    carries 3

    8 2 +1
    carryValue 1
    carries 4

    0 9 +1
    carryValue 1
    carries 5

  • Custom User Avatar

    Statement says:

    If a number is shorter, it will be zero-padded.

    Though in random tests this rule is not followed: shorter numbers are not zero-padded.

  • Custom User Avatar

    I DID IT!!!

    was quite some work to get it done... passed the last 100000 test in time, but had trouble to find a solution for the 1.000.000.

    so i was looking at other solutions, tried others out... looking at the
    and found solutions that didn't pass the attempt.

    are those old once, and test got changed?

  • Custom User Avatar

    Ruby 3.0 should be enabled.

  • Custom User Avatar

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

  • Custom User Avatar

    JS: Node 12x should be enabled and new test framework should be used

  • Custom User Avatar

    JS: No random tests

  • Custom User Avatar

    No random tests.

  • Custom User Avatar

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

  • Custom User Avatar
    • no random tests
    • nothing is told about operator precedence and string representation (=> use of parentheses or not => don't put any of them in any case)
    • operators are never tested with more than 2 arguments, while the description suggests the opposite
  • Custom User Avatar

    Rust:
    Why is IntoIterator for I, not Iterator?

  • Loading more items...