Ad
  • Custom User Avatar

    I solved this based on your description but some of the random tests are giving data that violates one of the tenants of the problem. I'm getting rows that are different lengths or entirely empty arrays as the expected outcome of the test.

    e.g.

    Expected: [
                ["O","O","O","O","O","O","O","O","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","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"],
                []
                ], 
    instead got: [
                ["O","O","O","O","O","O","O","O","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","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",null,null,null],
                [null,null,null,null,null,null,null,null,null,null]
                ]
    

    "The width of the glass will not change from top to bottom."