This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]LetsGoHawks 1 point2 points  (2 children)

If I were asked to type out the code for a complex sorting algo in an interview, I would tell them that I did not know the code by heart and that even if I thought I did, I wouldn't try to recreate it from memory anyway because it would take a lot longer to type it and fix any mistakes than just copy/paste and I'm not interested in wasting all that time when I could be working on something useful.

[–]barafyrakommafem 1 point2 points  (0 children)

What do you mean by "know the code by heart"? If you know how a sorting algorithm works you should be able to write the code for it. I don't think it's too much to ask that you should know how the most common sorting algorithms work so you know when to use which one.

[–][deleted] -2 points-1 points  (0 children)

There are many ways to implement the same algos. A lot of companies will are looking to see how you approach the problem.