Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • 178448?s=100

    @Steffan153 without having seen the Ruby implementation it seems as though you are not resetting the paperfold instance in between two runs.

    If I do paperfold.take(20) and then paperfold.take(1000) the first one takes the first 20, but the second one doesn't take the first 1000, instead it takes the next 1000 (21 through 1020). I think this is a bug, right?

  • 12795864?s=100

    Added sample tests and updated description.

  • 14909989?s=100

    I don't see what's the point of that statement: if you're running JS code it's run either from Node or from a browser, and both have their own exclusive stuff (browser has btoa and the likes).

  • 178448?s=100

    Why check 100 random letters? Why not just check all lowercase and all uppercase letters?

  • 178448?s=100

    One should note that this is not a "Javascript" solution, but a "Node.js" solution, as the Buffer object is offered by Node, not Javascript.

  • 12795864?s=100

    Fixed, and cleaned up the description a bit.

  • 20777740?s=100

    Agreed, way harder than 7. I expect they thought (as I did on first read) that the challenge was simply to return the number of months that start on Friday in a range of years.

  • 178448?s=100

    This sentence If multiple golds are found in one piece of soil they should be added together, so that the following piece of soil "g5 g5; sdg g44" has two pieces of soil, both containing gold, with respective values of 10 and 44. doesn't seem to be used for anything in the actual tests.

  • 178448?s=100

    It's the ending of the first that has to fit with the beginning of the next.

    Thus, in your example, we would get don between abanDON and DONation. Then we would get on between donatiON and ONion. Lastly, we would get on between oniON and ONgoing.
    This gives us dononon in total.

  • Profile pic

    Please provide the same input and output, as produced.

  • Profile pic

    Damn, I thought I had a nice solution.

  • 178448?s=100

    I too get the error with join, without using join at all, but it passes in Node v6.11.0.

  • 12795864?s=100

    Well, reading a bit around, it looks like that Ruby's sort is not stable (unlike Python), but it seems to work here...

  • 178448?s=100

    One would think that just sorting it wouldn't work, since multiple entries would all get 0 as a value. If sort_by was implemented differently in Ruby, you could get other (incorrect) results.

  • Profile pic

    Duplicate.

  • Loading more items...