Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 184 Bytes

First_Reverse_Try.md

File metadata and controls

12 lines (10 loc) · 184 Bytes
int[] firstReverseTry(int[] arr)
{
    if(arr.Length == 0) return arr;

    int x = arr[0];
    arr[0] = arr[arr.Length - 1];
    arr[arr.Length - 1] = x;
    return arr;

}