Should I remember some algorithm detail?

#1

I’ve been asked to write few sort algorithm with bare hands. But I have very poor memory technique on mapping the name to the detail implementation.

I know that both in EPI and PP (Programming Pearls) have suggested that the detail implementation easily goes wrong, and in practice we rarely implement it ourselves. (why risk?)

Even some guys in stackoverflow / reddit suggests that should not memorize these algorithms, but I’ve been asked to write it few time.

A guy even says: “you don’t know Merge sort, how could you do algorithm jobs” I really don’t know what to answer him.

Any help / suggestion welcome.

0 Likes

#2

Hey Tim,

Thanks for your question. I think there is a difference between memorizing and understanding. Personally I would recommend you to read how the concepts of those algorithms and implement by your own once (without looking how others implemented). Then, before interview, you can take a quick look of how you implemented those algorithms to get a sense why you choose to design and implement in this way.

My personal feeling is that people tend to look at how others implementations instead of implementing by your own. Although, there might be some very good implementations online but those might not fit into your own programming style. As a result, you feel it is hard to adopt those concepts into your mind. Therefore, I would suggest it is very important to implement by yourself since it will be the embodiments of your thoughts.

0 Likes