Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've been waiting for someone to ask me to reverse a string in an interview, so I can tell them why the code I just wrote for them (using the XOR trick, which is what they're usually expecting), is wrong.


When I've asked people to reverse a char* in the past, it's just been to see if they understand the basics of pointers. The XOR "trick" hasn't been impressive since high school. :)




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

Search: