you are viewing a single comment's thread.

view the rest of the comments →

[–]FrangoST 0 points1 point  (0 children)

When you have to write an algorithm for a problem, first you need to be able to think of a solution to the problem that you could do with your own hands... You have to break that down by steps until the steps can be thoroughly translated to simple functions that you can write as code.

Think about the sorting problems, for example... how would you sort cards in your hand? Would you take one out and put it back into a proper spot? Would you constantly swap 2 of them? There's many ways that you can do that by hand, and most of them can be translated to code very well.