12 May 2017

First Reverse Try

My solution:
int[] firstReverseTry(int[] arr) 
{
    return arr.Select((i, i1) => i1 == 0 || i1 == arr.Length - 1 ? i1 == 0 ? arr.Last() : arr.First() : i).ToArray();
}

Previous Next