PDA

View Full Version : Code efficiency


justinhull
10-13-2004, 10:45 PM
This semester I enrolled in a Data Structures/Programming Techniques course at my college. Unfortunately our professor isn't very helpful in explaining things and one of these topics happens to be Big-O notation.

Just as unfortunate is that our code has to be efficient in his mind for us to get full credit for assignments. He say's that we should be good enough to apply the big O to our code and identify if it's efficient enough.

My question is, is there any way someone could explain what it is i need to do to test my code and/or is there a program i could run on my code to test it? Thanks alot for any responses.

joh6nn
10-14-2004, 12:16 PM
http://truemeaningoflife.com/oldwisdom.php?topid=26072&responses=1

seriously, though, here's an article about the big O: http://www.cprogramming.com/tutorial/computersciencetheory/algorithmicefficiency1.html

and here's a primer on the basics of making your code more efficient: http://www.digitalmars.com/ctg/ctgOptimizer.html

justinhull
10-14-2004, 03:59 PM
Haha, that's pretty good. But seriously thanks for your help joh6nn both guides are really useful. I think I finally got this stuff figured out.