摘要: 977.有序数组的平方 暴力求解(O(n+logn)) class Solution: def sortedSquares(self, nums: List[int]) -> List[int]: return sorted(i**2 for i in nums) 双指针(O(n)) 由于列表是单调 阅读全文
posted @ 2023-10-12 21:10 忆象峰飞 阅读(14) 评论(0) 推荐(0)