Leetcode 977. Squares of a Sorted Array

class Solution(object):
    def sortedSquares(self, A):
        """
        :type A: List[int]
        :rtype: List[int]
        """
        return sorted([x * x for x in A])

 

posted @ 2019-04-09 05:03  周洋  阅读(160)  评论(0编辑  收藏  举报