You need to sign in or sign up before continuing.×
Ad
  • Custom User Avatar

    kata's Sensei @raulbc777 should add another example (with an even number of columns),
    or change the description to emphasise what's expected.
    Many assumed an alternating sum would work. (so did I at first, until I went with
    actually implementing the equation)

  • Custom User Avatar

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

  • Custom User Avatar

    I hope "The original array should not be modified." was added later. Or I just missed it!
    Great kata!

  • Custom User Avatar

    Javascript last non-random test:
    says [1,null,1,2,null,2,null] should stay as it is.
    instead of [1,1,1,2,2,2,null] like in other tests.
    example:
    Random input: [3,null,null,4,3,null,3,4,null,null,2,2,null,null,null]
    Test Passed: Value == [3,null,null,4,3,3,3,4,null,null,2,2,null,null,null] // note that input[5] changes

    Seems like an error

  • Custom User Avatar

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

  • Custom User Avatar

    @ecolban @g964
    JavaScript: my algorithm takes too long.
    worked up to test 8, but went over runtime for 7654320.

    I'll need a raincheck on that number theory if you would be so kind

  • Custom User Avatar

    @idjaw the round() did the trick! thanks!

  • Custom User Avatar

    good point about number of solutions + making past Beta. I'll keep that in mind.

  • Custom User Avatar

    thanks @MMMAAANNN and @Abbe for commenting. I solved it, figuring out Bananas from Bahamas was the key.

    and @MMMAAANNN, there was always a way to make the solution work, with a (case: test(x) return true;)

  • Custom User Avatar

    Code wants opposite things at the same time.

    instructions states:
    "The restriction is that the characters in part1 and part2 are in the same order as in s."
    however:

    • if it filters out unordered substrings... it fails to pass "Bananas from Bahamas" and the 'tricky random cases'
    • if it forgets about the order.. it passes every test BUT the "can handle characters in wrong order"

    so it's a no deal scenario.

  • Custom User Avatar

    Lost 4h trying to make map work.. u_u'

  • Custom User Avatar

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

  • Custom User Avatar

    @jhoffner hey, maybe I mistook my rank and wasn't downgraded at all...
    so I kinda would like to delete this entry.. however I can't. Any mods around? (suppose you'd know)

  • Custom User Avatar

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

  • Custom User Avatar

    I got knocked down 2 ranks (as I see it, without previous warning as to why)...
    so I'm speaking before giving up on this potentially-amazing-community.

    I understand the coding-competition-no-help-allowed-style, but this was never clear.
    So I took this site as a hard-level-practice-programming-paradise. And, as any normal being
    that codes in multiple languages (c, c++, openCV, matlab, haskell, html, css, javascript, python, jquery...),
    beside speaking other 3 and having other hobbies. I simply don't memorize all syntax and basic libraries.
    I:
    1 - understand the paradigm I'm using.
    2 - understand the language (i.e.: Python is all about indentation and has nice list library).
    3 - think of an algorythm with needed iterations and recursions. Breaking down the problem into smaller-simpler ones.
    4 - look up basic libraries (with a great probability that the function exists, or return to step 3).
    5 - check type compatibility, check that the modulated and main functions are working as expected and voilĂ !

    So, how is this - as said by @jhoffner - "cheating myself"? (talking about needed step 4).

    How exactly does the cheat-detection work?

    • am I allowed to use online IDEs, coz I'm not yet confortable here?
    • am I allowed to check libraries online, or must it be all on 'myPersonalNotes.txt'?
    • or is it just stackoverflow the Don't-even-go-there-land?
  • Loading more items...