Skip to content

Commit 7731e8f

Browse files
committed
Fixed comments.
1 parent 0bb4bbf commit 7731e8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

topics/go/algorithms/numbers/palindrome/palindrome.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ import "github.com/ardanlabs/gotraining/topics/go/algorithms/numbers/reverse"
55
// Is checks if a integer is a Palindrome.
66
func Is(input int) bool {
77

8-
// Integer below zero cannot be palindrome.
8+
// An negative integer is not a palindrome.
99
if input < 0 {
1010
return false
1111
}
1212

13-
// A integer is a palindrome if it has the value between 0 and 9.
13+
// An integer that is only one digit in length is a palindrome.
1414
if input >= 0 && input < 10 {
1515
return true
1616
}
1717

18-
// Get the reverse integer.
18+
// Reverse the digits in the integer.
1919
rev := reverse.Reverse(input)
2020

2121
return input == rev

0 commit comments

Comments
 (0)