思路
按照题意解决
code
func sortedSquares(A []int) []int {
for k, v := range A {
A[k] = v * v
}
sort.Ints(A)
return A
}
更多内容请移步我的repo:https://github.com/anakin/golang-leetcode
按照题意解决
func sortedSquares(A []int) []int {
for k, v := range A {
A[k] = v * v
}
sort.Ints(A)
return A
}
更多内容请移步我的repo:https://github.com/anakin/golang-leetcode