mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-05 00:25:22 +08:00
42 lines
504 B
Go
42 lines
504 B
Go
package leetcode
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func Test_Problem125(t *testing.T) {
|
|
|
|
tcs := []struct {
|
|
s string
|
|
ans bool
|
|
}{
|
|
|
|
{
|
|
"0p",
|
|
false,
|
|
},
|
|
|
|
{
|
|
"0",
|
|
true,
|
|
},
|
|
|
|
{
|
|
"race a car",
|
|
false,
|
|
},
|
|
|
|
{
|
|
"A man, a plan, a canal: Panama",
|
|
true,
|
|
},
|
|
}
|
|
fmt.Printf("------------------------Leetcode Problem 125------------------------\n")
|
|
|
|
for _, tc := range tcs {
|
|
fmt.Printf("【input】:%v 【output】:%v\n", tc, isPalindrome(tc.s))
|
|
}
|
|
fmt.Printf("\n\n\n")
|
|
}
|