Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yehong committed May 23, 2021
1 parent ccace14 commit 4a22b72
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions week07/433.minMutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,6 @@ func minMutation3(start, end string, bank []string) int {
continue
}
newGene := curr[:i] + string(char) + curr[i+1:]
// if _, has := wordSet[nextWord]; has {
// if _, has := endSet[nextWord]; has {
// return true
// }
// if _, has := visited[nextWord]; !has {
// nextSet[nextWord] = struct{}{}
// visited[nextWord] = struct{}{}
// }
// }
if _, has := bankSet[newGene]; has { // 有效的基因
if _, has := endSet[newGene]; has { // 在 endSet 中找到了新基因,变异完成
return step
Expand Down

0 comments on commit 4a22b72

Please sign in to comment.