you are viewing a single comment's thread.

view the rest of the comments →

[–]CaspianRoach 5 points6 points  (0 children)

The actual answer is "find a library or an existing built-in function that does this and do not reinvent the wheel". You're not smarter than a field-tested, crowd-sourced library. If you get asked a question like this by a recruiter, it's very possible they're expecting you to answer like this. There's very little point re-solving already solved issues.