Complete the code to reverse the array using a built-in method.
Array.[1](arr);The Array.Reverse method reverses the elements of the array in place.
Complete the code to swap elements at positions i and j in the array.
int temp = arr[[1]];To swap elements, first store the element at index i in a temporary variable.
Fix the error in the loop condition to reverse the array by swapping.
for (int i = 0; i < arr.[1] / 2; i++)
The property Length gives the number of elements in the array.
Fill both blanks to complete the swap inside the loop for array reversal.
arr[[1]] = arr[[2]];
Swap element at index i with element at index arr.Length - 1 - i to reverse the array.
Fill all three blanks to create a dictionary that maps each element to its reversed index.
var reversedIndices = new Dictionary<int, int> { { [1], [2] } };
int reversedIndex = arr.Length [3] 1 - i;Map the element arr[i] to its reversed index i. Calculate reversedIndex as arr.Length - 1 - i.
