Sort given Array which is already Sorted based on absolute values of elements
Given an array arr[] of size N, sorted based on the absolute value of its elements. The task is to sort this array based on the actual values of the elements. Examples: Input: arr[] = {5, -7, 10, -11, 18}Output: -11, -7, 5, 10, 18Explanation: When the array is sorted the negative values will come at