News for hackers. Stuff that matters.
Re:How often does XOR magic come up in interviews? by nyx_ on Wednesday January 16, 2019 @06:56PM (#18926903)
I think it's a nice-to-have and not a need-to-have.

This is a super basic example, but I had a phone-screen question that was "reverse the order of the words in this C array in-place without allocating more memory." I found out with clarifying questions that I could use a temporary variable, but midway through I remembered how the XOR swap worked, and I think that scored me some points with the interviewer.

There are no comments on this comment yet.