Ad
  • Custom User Avatar

    Looks like you solved it, closing ~~

  • Custom User Avatar

    Hopefully fixed that, but unless otherwise specified, it is always better never to change the starting array.

  • Default User Avatar

    So, there are 13 'O', 22 'A', 23 'W', 24 'H' in the input data, but 15 'O', 26 'A', 29 'W', 25 'H' in expected result. I don't get it... Maybe I misunderstood something? This is JavaScript version.

    Input: [ [ 'A', 'H', 'O', 'H', undefined, 'A', 'H', 'A', 'W', undefined ],
    [ 'A', 'W', 'H', 'A', 'O', 'A', 'W', 'H', 'W', 'O' ],
    [ 'W', 'W', undefined, 'W', 'H', undefined, 'A', 'H', 'W', 'H' ],
    [ 'W', undefined, 'O', 'W', undefined, 'A', 'W', 'A', 'A', 'H' ],
    [ 'W', 'H', 'O', undefined, 'H', undefined, 'H', 'H', 'O', 'A' ],
    [ 'O', undefined, 'H', 'H', 'W', 'A', 'H', undefined, 'A', undefined ],
    [ 'O', 'H', 'W', 'A', 'O', 'A', 'H', 'H', 'W', 'A' ],
    [ 'A', 'O', undefined, 'H', undefined, 'O', 'H', 'W', 'A', 'H' ],
    [ 'H', 'W', 'A', undefined, 'W', 'A', 'W', 'W', 'O', 'O' ],
    [ 'A','W',undefined,undefined,'W','H','W',undefined,undefined,'A' ] ]

    Expected: [["O","O","O","O","O","O","O","O","O","O"],
    ["O","O","O","O","O","A","A","A","A","A"],
    ["A","A","A","A","A","A","A","A","A","A"],
    ["A","A","A","A","A","A","A","A","A","A"],
    ["A","W","W","W","W","W","W","W","W","W"],
    ["W","W","W","W","W","W","W","W","W","W"],
    ["W","W","W","W","W","W","W","W","W","W"],
    ["H","H","H","H","H","H","H","H","H","H"],
    ["H","H","H","H","H","H","H","H","H","H"],
    ["H","H","H","H","H"]],

    instead got: [["O","O","O","O","O","O","O","O","O","O"],
    ["O","O","O","A","A","A","A","A","A","A"],
    ["A","A","A","A","A","A","A","A","A","A"],
    ["A","A","A","A","A","W","W","W","W","W"],
    ["W","W","W","W","W","W","W","W","W","W"],
    ["W","W","W","W","W","W","W","W","H","H"],
    ["H","H","H","H","H","H","H","H","H","H"],
    ["H","H","H","H","H","H","H","H","H","H"],
    ["H","H"],
    []]

  • Custom User Avatar

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

  • Custom User Avatar

    Done! :) TY

  • Custom User Avatar

    Just for your description change the last sentence to
    "Psst! Ask Pitagoras for more information, but don't tell him I sent you :)"