test case problem


  • 1
    J

    "AAAAAAAA"
    "CCCCCCCC"
    ["AAAAAAAA","AAAAAAAC","AAAAAACC","AAAAACCC","AAAACCCC","AACACCCC","ACCACCCC","ACCCCCCC","CCCCCCCA"]

    should return 8 but the solution is -1.


  • 0

    Yes the solution is -1 because the end is not a valid gene, since it is not present in the bank. Check the question which says the start is valid gene since not included in the bank but the end does not have to be valid. Thus return -1


  • 0
    J

    oh I see. now it makes sense.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.