4 ms·
I interviewed at a very large corporation. 3-4 interviews a week. We accepted any correct solution.
by rorrr 15y ago
I interviewed at a very large corporation. 3-4 interviews a week.
We accepted any correct solution.
- jodrellblank 15y agoYou've said correct twice, but what do you mean by it? Do you give a spec they have to meet or a test set to compare against? Must they handle encodings/Unicode, or fail predictably in edge cases? Or are you talking about characters swapped, even/odd lengths/ empty strings, that's all?
- rorrr 15y agoOh, we usually ask a very simple version - function to return a reversed string that's passed as a parameter. It consists of English letters, it's not blank. You're not allowed to use the standard string reverse function/method. It never gets to edge cases. Most people can't even write the simple version. I'm pretty sure nobody can write the unicode-safe version during the interview, even the smartest developers I've worked with (I guess that depends on the language though).