Ad
  • Custom User Avatar

    It is not mandatory to test all the possible outputs in fixed tests.

  • Default User Avatar

    No test cases for [queen, bishop] solutions: example of one:

    `
    test case
    test.assert_equals(

    promotion(
      [
        [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], 
        [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], 
        [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], 
        [' ', ' ', ' ', ' ', ' ', ' ', 'K', ' '], 
        [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], 
        [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], 
        [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], 
        [' ', ' ', 'P', ' ', ' ', ' ', ' ', ' ']
      ]
    ), 
    ["queen","bishop"]
    

    )

    `

  • Default User Avatar

    The rule to break tie should follow classic piece ranking

    Queen, rook, bishop, knight in this order

  • Custom User Avatar

    Am i wrong?

    I don't know if you are wrong. It may be a good exercise but there are more straightforward approaches. The input is just a 8 * 8 array.

  • Custom User Avatar

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

  • Custom User Avatar

    You are on the wrong track. No need no graph theory to solve it.

  • Custom User Avatar

    I think this is terrific graph problem but I'm not sure it belongs on the current difficulty it is at :) (currently 6). Anyone else feel the same?