diff --git a/src/chapter1/problem5.go b/src/chapter1/problem5.go index 3bff2e2..7ee0874 100644 --- a/src/chapter1/problem5.go +++ b/src/chapter1/problem5.go @@ -16,10 +16,9 @@ func oneRemovalAway(smaller, larger string) bool { if r1 != r2 { if removalSeen { return false - } else { - width1 = 0 - removalSeen = true } + width1 = 0 + removalSeen = true } } return true @@ -41,9 +40,8 @@ func AreOneEditAway(input1, input2 string) bool { if r1 != r2 { if diffSeen { return false - } else { - diffSeen = true } + diffSeen = true } } return true