using System;
public class Program
{
public static void Main()
Console.WriteLine(Program.Reverse("abcdefghijk"));
}
// Rules for this exercise:
// Code the Reverse()
// We are not looking for an efficient algorithm. We are looking for the cleverest solution with limited tools.
//
// Example, If str="abcdefghijk",then the return value will be "afedcbghijk"
public static string Reverse(string str)
char[] array = new char[str.Length];
int count = 0;
for (int i = str.Length - 1; i >= 0; i--)
array[count++] = str[i];
return new string(array);