Created
December 31, 2016 14:37
-
-
Save bigworld12/44ac83d43c418e817f0b81d988c3fd83 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Reverse(int[] arr) | |
{ | |
int[] buffer = new int[arr.Length]; | |
for (int i = 0; i < arr.Length; i++) | |
{ | |
buffer[arr.Length - 1 - i] = arr[i]; | |
} | |
for (int i = 0; i < arr.Length; i++) | |
{ | |
arr[i] = buffer[i]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment