Golang | Leetcode Golang题解之第521题最长特殊序列I
题目:
题解:
func findLUSlength(a, b string) int {
if a != b {
return max(len(a), len(b))
}
return -1
}
func max(a, b int) int {
if b > a {
return b
}
return a
}
题目:
题解:
func findLUSlength(a, b string) int {
if a != b {
return max(len(a), len(b))
}
return -1
}
func max(a, b int) int {
if b > a {
return b
}
return a
}