A/C Python solution, beat 90%, easy to understand

  • 0

    class Solution(object):
    def sortTransformedArray(self, nums, a, b, c):
    :type nums: List[int]
    :type a: int
    :type b: int
    :type c: int
    :rtype: List[int]
    res = []

        for num in nums:
            tmp = a*num*num + b*num + c
        return sorted(res)

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.