Sollicitatievraag bij Crestron Electronics

Given a string write a program to reverse it.

Antwoorden op sollicitatievragen

Anoniem

20 nov 2017

namespace ReserveString { class Program { static void Main(string[] args) { Console.WriteLine(Reserve("ABCDEFGHIGKLMNOPQRST")); Console.ReadLine(); } public static string Reserve(string str) { if (str == null || str.Length <= 0) { return ""; } return str[str.Length - 1] + Reserve(str.Substring(0, str.Length - 1)); } } }

Anoniem

13 mrt 2018

Thanks for this valuable information, are there other technical questions more difficult than this that were asked?