Thread: I have some questions about data structures and algorithms

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    34

    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.
    Last edited by Tonyukuk; 03-27-2003 at 11:23 AM.

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065

    Re: I have some questions about data structures and algorithms

    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?

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    162
    Sorry..Skipped the classes on Big O notation

  4. #4
    Registered User
    Join Date
    Oct 2002
    Posts
    34
    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.

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    First, read the FAQ. Especially the parts about showing your attempt, NOT asking someone to do your homework for you, etc.
    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.
    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...
    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?
    Last edited by DougDbug; 03-27-2003 at 02:24 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Algorithms and data structures book?
    By Lechx in forum C++ Programming
    Replies: 6
    Last Post: 09-30-2008, 09:05 PM
  2. Algorithms and Data Structures...
    By Junior89 in forum C++ Programming
    Replies: 2
    Last Post: 04-05-2007, 05:13 AM
  3. data structures and algorithms
    By ajrillik in forum C Programming
    Replies: 0
    Last Post: 08-11-2005, 01:50 PM
  4. data structures and algorithms
    By Tonyukuk in forum C Programming
    Replies: 2
    Last Post: 03-19-2003, 08:25 AM
  5. Data Structures and Algorithms
    By Nor in forum C++ Programming
    Replies: 0
    Last Post: 04-13-2002, 11:56 PM