Domanda di colloquio di Amazon

How do you reverseString? What if the length provided is negative? How would you handle it?

Risposte di colloquio

Anonimo

28 gen 2014

arr[] a = inputString.ToCharArray(); a.Reverse(); return new String(a);

2

Anonimo

19 mar 2013

try/accept, assert, if statement