//Daniel Grinshpon
import java.util.*;
class Main
{
public static void main(String...args)
{
int[] x = {1,2,3,4,5,6,7,8,9,0};
System.out.println("Original Array: " + Arrays.toString(x));
reverse(x);
System.out.println("Reversed Array: " + Arrays.toString(x));
System.out.println("Minimum Value In Array: " + getMin(x));
int[] y = computeTwice(x.clone());
System.out.println("Compute Twice Array: " + Arrays.toString(y));
}
public static void reverse(int[] arr)
{
for(int i = 0; i < arr.length/2; i++)
{
int temp = arr[i];
arr[i] = arr[arr.length-1-i];
arr[arr.length-1-i] = temp;
}
}
public static int getMin(int[] arr)
{
int min = arr[0];
for(int i = 1; i < arr.length; i++)
{
min = (min < arr[i]) ? min : arr[i];
}
return min;
}
public static int[] computeTwice(int[] arr)
{
for(int i = 0; i < arr.length; i++)
{
arr[i] *= 2;
}
return arr;
}
}