Ad
  • Custom User Avatar

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

  • Custom User Avatar

    This test looks wrong. Array has 23 positions and the answer has 36.

    snail([[1,2,3,4,5,6],[21,22,23,24],[32,33,34],[36,31],[28,29,30],[12,13,14,15,16]]) -
    Expected: '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]', instead got: '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 31]'

    I might be misunderstading..?

    For reference I had a bug in my code but somehow that seems to mess with the result in the above assertion.

  • Custom User Avatar

    I read the first three words and got a massive clanging sound in my brain...
    My error checking is not what it should be.

  • Custom User Avatar

    Lost on why 1.100 is NaN, if I knew why I coud fix it... Don't want to workaround for the specific value, am I missing something?

  • Custom User Avatar

    Solved it, my knowledge of the RegExp object is a bit sharper now.

  • Custom User Avatar

    Wow a lot of people are stuck, me too!

    Been trying to regex word boundaries which works the majority of the time and others it just doesn't 'bc' being my main problem. I see you are being pretty helpful, I'd love to know where I am going wrong.

    It's probably just late and I can't think straight. tried the same strings in a regex processor and it works as I would expect..

  • Custom User Avatar

    Last one fails but not much feedback, I am thinking one of the parameters is an object so it needs to recurse but there is no clue. Would be useful if we knew what the response was supopsed to be.

  • Custom User Avatar

    I have been thinking abou this for days, still don't think my solution is too elegant but I beat it in the end!

  • Custom User Avatar

    I have test cases in my current Kata and I get the error 'Test didn't pass: Unknown error'

  • Custom User Avatar

    Test engine is down

  • Custom User Avatar

    Is there an error in the test code?
    I am only asking because I get all examples correct except for 'a to a' in the simple arcs section. But the arcs array looks to be missing something (either {start:b,end:a} or {start:a, end: a}) see below.

    describe("Simple graph with 1 arc", function() {
    var arcs = [
    { start: "a", end: "b" },
    ]

  • Custom User Avatar

    I like the idea of recusrsive defintely, mine was heavier than this but check this out...

    function solution(l){
    return l.map(function(x,i){return l[--i]==x-1&&l[i+2]==x+1?'':x;}).join().replace(/,(,)+/g,'-');
    }

    I was blown away.

  • Custom User Avatar
  • Custom User Avatar

    I quite liked it, harder than I initially thought (but not too tough for a friday night) it would have been handy to have a dictionary word longer than the pattern. I guess that was the point but totally missed it!