Problem solving/ Algorithm Skill is a knack or can be developed with practice? [closed]

Solution 1:

I spent a big part of my life wondering whether talent was something you developed or something you were born with. Then it occurred to me that the answer was irrelevant, at least if you want to achieve things yourself. Even if you have talent, it will only help you if you act as if talent only comes from practice, because you will work that much harder.

With regards to algorithms, as well as any other really difficult skill, it takes practice to get good. Whether or not you have to have some amount of talent too, I don't know. I do know for a fact, however, that people have made huge improvements in competitions like TopCoder by practicing. I myself have learned a lot from that.

If you set up a systematic training program, you will be way ahead of the pack, even if it is not perfect. I have written a few hundred programs on TopCoder by now and it has affected my thinking in a profound way. I have learned a lot of things that could only ever be learned by doing them wrong and then fixing my mistake. A friend of mine has written several thousand programs on TopCoder and he is way better than I am, even though his stats were worse when he started out than mine were. That is no coincidence.

EDIT:

I just came across this answer at math.stackexchange. I think it is one of the best explanations of how to learn algorithms I have read, even though he writes about chess and math.

Solution 2:

1) Don't try to solve the problem in its most general abstraction.
2) Choose the right time when your mind is working at maximum.

I got the first point as an advice from a math instructor. It works! try to do different examples and scenarios of the problem. This helps greatly in identifying the edge cases which are the hardest to understand in most problems.

My favorite time for solving this kind of problems is the dawn(4-6 AM). Have a good sleep the night before, and wakeup ready to solve the problem. Silence is your friend.

I do believe that some people have extra intelligence than others, but it is not the most important factor. It is how you utilize this intelligence to solve the problem.

Solution 3:

I took magic lessons in a group setting when I was twelve years old. The magician's name was Joe Carota. He did a magic trick one time and I blurted out, "How did you do that?" He said something that day that has stuck with me ever since.

Joe's response, "Michael, if you really want to know how that trick is done you must figure out how you would do it yourself."

Well of course that's not what I wanted to hear but it did get my mind focused on problem solving. This was problem solving from my perspective. If my first attempt at solving the problem took seventeen steps and was really klunky, the good news was I solved the problem.

Then by looking at the solution I had developed and further looking for ways to refine that solution I would learn how to streamline the end result. Later on in my computer programming life I found out that this process was called "Stepwise Refinement".

It worked back in 1971 and it still works today.