Re:The Surprising Number of Programmers Who Can’t Program
by carapace on Friday August 23, 2019 @11:33AM
(#20778650)
I can't help myself: In Python to reverse a string (or other sequence)...
In [1]: "?he ,taeN"[::-1]
Out[1]: 'Neat, eh?'
I've had the same experience asking applicants to reverse a string in a language of their choice. sometimes they'll give me a simple answer like "''.join(reversed(my_str))" (python), which i'll accept and move on to the next (harder) question, but even if you don't remember that syntax, you should be easily able to build a function using a for loop. I find that 50% of applicants can't and it saves me a lot of time finding this out early in the interview process.