Take the 2-minute tour ×

I'm currently studying computer science at the Institute, and I have some problems with course which is named Algorithms, I've just begun to study it, but I'm already feeling, that I'm going to fail it, my problem is that while understanding different algorithms on graphs I need to keep in my mind a lot of info, and usually I can't do it, I forget some points of the exercise or can't proceed to final result, I'm very desperate about it cause I like programming very much.

Did somebody feel the same while studying in the University?

P.S. I began to program only two years ago, may it be the problem?

Many people find this stuff difficult at first. It doesn't mean there's something wrong with you and it doesn't mean you'll never get it. It does mean that you need to work at it, -- so don't give up! As Andrey says, (1) the more you do the easier it'll get and (2) you might benefit from looking at some simpler algorithms. Have you talked to the person who teaches your algorithms course? –  Gareth McCaughan Mar 17 '11 at 13:09
It is hard (or nearly impossible) to keep more than 5 distinct entities in mind. If you find yourself struggling, you're simply doing something wrong - you need to operate on a higher level of abstraction, hiding the details. Also, it is never a good idea to try to trace an execution of algorithms in your head - you just don't need to do it. –  SK-logic Mar 17 '11 at 13:45
I can study Abstract Factory, but until I program a good example, I have no idea what it means. Usually, you learn out of context of other patterns, like DDD where you create a Repository for Saving and Loading, and a Factory to create new. –  Dr. Zim Mar 17 '11 at 23:34
comments disabled on deleted / locked posts

migration rejected from stackoverflow.com Sep 25 '13 at 22:47


closed as primarily opinion-based by gnat, MichaelT, GlenH7, Kilian Foth, Dan Pichelman Sep 25 '13 at 22:47


3 Answers

When I started studying computer science, that was the first thing that was taught to me. Algorithms, are the fundation stone over all and every computer program is built upon.

That subject wil make you design better programs, understand the actual logic going behind, and a ton of other things.

Do not worry about not "Getting it" the first time around, that's quite usual and I suppose it hapens to everyone. as mentioned early go ahead and do some simple progams, and build up complexity from there.

That's the reason it is called a cold run, you go step by step, doing each process separately until you reach the end of the program.

You could also see an algorithm as a step by step explanation of a program, like:

begin, read hese values, are they positive? then do this, and next end.

add comment

Always try the algorithms on simple examples with few nodes/elements/"whatever the algorithm is about" on paper and drawing and writing your thoughts and steps. Then try to write some pseudo-code (if you have to implement it). If you don't have to implement it just understand it the first step should be enough if you increase the size of the problem several times until you feel sure you've understood it.

Drawing/writing on paper is a great way to understand things!

add comment

I recommend looking into other sources of information about algorithms.

Perhaps a book like this one:

enter image description here

add comment