Comment by marshray
8 days ago
I wrote the "function to reverse a string" in a job interview once. Then the interviewer reminded me that strrev() had been part of the standard C library since K&R.
I'd been programming in C(++) for ~15 years by then and had never had the occasion to reverse a string. I still wonder whether that makes it a good job interview question, or a terrible one. Some of both probably.
It’s a good one, if you can still write functionally and same algorithmic complexity then it should not matter if you know strrev or not.
Except that an extremely complex algorithm involving large data tables is required for Unicode or other modern text encodings.
strrev is not a standard C function. I actually don't think my computer even has it (it's a Mac).
Well I don't feel so bad for not having known it then. Thanks!
Yeah I didn’t know about it until you mentioned it either