Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?


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

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

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

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

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

3 Answers 3

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.


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!


I recommend looking into other sources of information about algorithms.

Perhaps a book like this one:

enter image description here