Question d’entretien chez Crestron Electronics

Given a string write a program to reverse it.

Réponses aux questions d'entretien

Utilisateur anonyme

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

Utilisateur anonyme

13 mars 2018

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