public class Solution { public int[] SortedSquares(int[] A) { return A.Select(x => x * x).ToList().OrderBy(x => x).ToArray(); } }