Squares of a Sorted Array - Leetcode 977 - Python