# I have some questions about data structures and algorithms

Printable View

• 03-27-2003
Tonyukuk
I have some questions about data structures and algorithms
------------------------------------------------------------------------------
4n2 , log3n , 3n, 20n, 2 , log2n , n2/3

How can I graph these expressions.Andhow can I state the range of values of n for each expressions? which that expression is the most efficient?
-------------------------------------------------------------------------------
4n2, log3n, n!, 3n, 20n, 2, log2n, n2/3

How can I arange the following expressions by growth rate from slowest to fastest?
---------------------------------------------------------------------------------
when you answer these questions please express them step by step and give the details. (the numbers that is written right side on 'n' means power.
• 03-27-2003
jdinger
Re: I have some questions about data structures and algorithms
Quote:

Originally posted by Tonyukuk
when you answer these questions please express them step by step and give the details.
Because you teacher wasn't detailed enough when he/she explained it or because you didn't pay close enough attention?
• 03-27-2003
Jamsan
Sorry..Skipped the classes on Big O notation :o
• 03-27-2003
Tonyukuk
Ok. I confess I skip the class but why don't you help me. I didn't want you to do my homework or etc.... I only want to understand and learn.
• 03-27-2003
DougDbug
First, read the FAQ. Especially the parts about showing your attempt, NOT asking someone to do your homework for you, etc.
Quote:

How can I graph these expressions
If you're new to C++, you may be surprised to learn the graphics are not part of standard C++. It depends on your compiler / graphics library.
Quote:

Andhow can I state the range of values of n for each expressions? which that expression is the most efficient?
I don't even know what this means, but it doesn't sound like a programming question...
Quote:

How can I arange the following expressions by growth rate from slowest to fastest?
After you find the growth rates (derivitive? Is this calculus?) and, assuming that the growth rates are numbers (not formuli) you can use "if" statements to compare them: if(A>B). (Maybe they mean the growth rate for some givne value of n??? )

[EDIT]
Oh, I thing I get it... 4n2 means 4 squared?