Because anyone who can't do this almost certainly doesn't have the ability to program any software system well, some shitty web app or otherwise. You're not trying to fill out a remedial CS course in community college, you're trying to get someone to program real things real people use.
The only way this question wouldn't be useful is if you had a good filter such that almost everyone who gets to that point would answer that question correctly. But apparently, this is not the case. There are people who fail such tests (despite apparently good paper qualifications and ability to talk BS). It's fairly important that you not let through such imposters.
And yes I've hired people and all of them have had to answer much more complex algorithmic questions to get the job and all of them turned out to be competent. And "have you ever had to" questions are ingenuous - interview settings are never going to be replicated exactly in a work setting, unless your job is to go around to be interviewed for different jobs. Good interview questions don't simulate work setting - they extract most critical work-relevant information about the candidate without wasting time.
"Because anyone who can't do this almost certainly doesn't have the ability to program any software system well, some shitty web app or otherwise. You're not trying to fill out a remedial CS course in community college, you're trying to get someone to program real things real people use."
So...I'm hiring someone that can reverse a string because this demonstrates that they can program real things that real people use?
"And yes I've hired people and all of them have had to answer much more complex algorithmic questions to get the job and all of them turned out to be competent."
Out of interest, what did this job entail? I assume that you quizzed them on their knowledge of basic algorithms because they are required to write them, right?
The only way this question wouldn't be useful is if you had a good filter such that almost everyone who gets to that point would answer that question correctly. But apparently, this is not the case. There are people who fail such tests (despite apparently good paper qualifications and ability to talk BS). It's fairly important that you not let through such imposters.
And yes I've hired people and all of them have had to answer much more complex algorithmic questions to get the job and all of them turned out to be competent. And "have you ever had to" questions are ingenuous - interview settings are never going to be replicated exactly in a work setting, unless your job is to go around to be interviewed for different jobs. Good interview questions don't simulate work setting - they extract most critical work-relevant information about the candidate without wasting time.