Frage im Vorstellungsgespräch bei Crestron Electronics

Given a string write a program to reverse it.

Antworten zu Vorstellungsgespräch

Anonym

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)); } } }

Anonym

13. März 2018

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