Hacker News new | past | comments | ask | show | jobs | submit login

I assume the question is something along the lines of "Implement a strrev in the language of your choice", not "Use the strrev equivalent in the language of your choice".



Even with this addendum, there is a grey zone:

    reversed_string = string[::-1]
Is it just using the equivalent, or a new implementation?


If I was the interviewer in that case I would probably accept that, with note that the person seemed clever. Then I would ask another harder question that I would hope would trip them up if they didn't understand iteration.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: