🎨 remove unused checks
This commit is contained in:
parent
c7ce85ed63
commit
10b836e46a
10
day4/main.go
10
day4/main.go
@ -84,11 +84,6 @@ func HasOneDouble(i int) bool {
|
||||
iStr := strconv.Itoa(i)
|
||||
|
||||
for len(iStr) >= 2 {
|
||||
if iStr[0] != iStr[1] {
|
||||
iStr = iStr[1:]
|
||||
continue
|
||||
}
|
||||
|
||||
i := 1
|
||||
for len(iStr) > i && iStr[0] == iStr[i] {
|
||||
i++
|
||||
@ -97,11 +92,6 @@ func HasOneDouble(i int) bool {
|
||||
if i == 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
if len(iStr) <= i {
|
||||
return false
|
||||
}
|
||||
|
||||
iStr = iStr[i:]
|
||||
}
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user