 // Also O(n). Compared to isPalindromeReverse, the advantage is that it returns false on the first
 // failed comparison, but the disadvantage is that calling the log10 function is expensive. Both
 // functions perform roughly the same when benchmarked against random integers.
-public func isPalindromeLog(number: Int) -> Bool {
+public func isPalindromeLog(_ number: Int) -> Bool {
     if number <= 0 {
         return number == 0
     }

    return reverse(number) == number
}

func reverse(number: Int) -> Int {
    var n = number
    var r = 0


// TO(n) where n is the number of digits of number in base 10.
public func isPalindromeReverse(_ number: Int) -> Bool {
    if number < 0 {
        return false
    }
