Sort squares of a sorted array uses two pointers technique instead of sorting algorithm. The time complexity is O(n).