DEV Community

loading...

Discussion on: Interview Qs Decoded - # 2

Collapse
elleattwell profile image
Harry Balls

Pretty cool. Check my solution.

private static object ReverseString(string input)
{
var str = "";
int index = input.Length - 1;
while (index >= 0)
{
str += $"{input[index--]}";
}
return str;
}