Given an array of both positive and negative integers 'arr[]' which are sorted. The task is to sort the square of the numbers of the Array.
Simple solution is to first convert each array element into its square and then apply any “O(nlogn)” sorting algorithm to sort the array elements.
Learn various programming languages on our website: https://www.studytonight.com
Find us on Instagram: / study.tonight (we post great videos here too)
Find us on LinkedIn: / studytonight