should return 8 but the solution is -1.
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
oh I see. now it makes sense.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.