4 ms·
For C++ std::string, I might well code up an iterator adapter. :-D A while back I mentioned this on Kuro5hin. "K5" members are reknowned for being total jack
by MichaelCrawford 12y ago
For C++ std::string, I might well code up an iterator adapter. :-D
A while back I mentioned this on Kuro5hin. "K5" members are reknowned for being total jackasses. Some kuron told me that the correct solution was to call the C standard library function that reverses strings - "strrev()" or some such. His point was that one should never implement code from scratch, if one could use a library call.
I pointed out that I was required to implement strrev() myself. My interviewer wasn't asking me to call a library function.
This set off a flame war that lasted for hours. This compleat gentleman flatly refused to accept that there was any other correct solution than to call a library routine, despite that it was quite clear to me, when I interviewed, that I was not permited to.