Exponential value sort
Given a sorted array arr[] and an integer P. Your task is to raise elements of arr[] to power of P and return them in sorted order in a new array. Examples:Input: arr[] = {-20, -5, 1, 2, 8}, P=2Output: 1 4 25 64 400Explanation: When we square the values of arr we get 400,25,1,4,64 which then sorted will give us the values as [1,4,25,64,400]. We hav