
Do not return or print the array and make changes in the same array.
Let the array be [1,32,4], after dividing each number by 4 our array will become [0, 8, 1].
Now replace the 0 by -1 so that [0, 8, 1] -> [-1, 8, 1].
Hence the modified array will be [-1, 8, 1].
The first line contains an Integer 'T' which denotes the number of test cases or queries to be run. Then the test cases follow
The first line of each test case contains an Integer ‘N’ denoting the size of the array
The second line of each test case contains ‘N’ space-separated integers denoting the elements of the array ‘arr’.
For each test case print, ‘N’ space-separated integers denoting the changed elements of the array ‘arr’.
Output for each test case will be printed in a separate line.
You are not required to print anything, it has already been taken care of. Just implement the function.
1 <= T <= 100
1 <= N <= 5*10^3
0 <= arr[i] <= 100
Time Limit: 1 sec
We have to change the array ‘ARR’ according to the quotient obtained after dividing by 4. So we will iterate through the array and change the element of array ‘ARR’ accordingly.