Sort array after converting elements to their squares
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. Examples: Input : arr[] = {-6, -3, -1, 2, 4, 5}Output : 1, 4, 9, 16, 25, 36 Input : arr[] = {-5, -4, -2, 0, 1}Output : 0, 1, 4, 16, 25Simple solution is to firs