Thread: It's that time again!

  1. #16
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    Quote Originally Posted by Prelude
    >What I mean is, what is 'O' and what is 'N'? And what does the '!' mean when you have "N!"?
    O is Big O notation. It makes it way easier to compare algorithms, but I haven't gotten around to writing a tutorial on it yet. N! is the mathematical notation for the factorial of N.

    >For those of us who haven't done this sort of thing in math it might
    >help, though I don't know how hard it is to actually explain.
    Put simply, it's a way to determine the growth of an algorithm. For example, if you have an O(N^2) algorithm, the running time increases quadratically when N doubles. That's bad compared to O(N), where the running time grows in proportion to N. O(Nlog N), also given as O(N * log N) is inbetween O(N^2) and O(N). It's considered to be pretty good for a sorting algorithm. N is the number of items, by the way.

    >but unfortunately I had to stop reading as soon as I reached that section because the O/N stuff threw me.
    You don't have to know that stuff to get something out of the tutorial. I think I did a pretty good job of explaining which algorithms are good and which are bad without relying too much on O notation.
    But O notation is pretty cool when you start to understand it. I have found being a !math person, that reading algorithm books sort of exclude people who are not in the know. If you do decide to write an article on O notation, perhaps you would consider taking it from a pretty basic level of understanding so that hobbyists can reap the benefits of understanding the more technical aspect of algorithm efficiency.

    edit:: so much for actually reading the whole thread before I put my two cents worth in...

  2. #17
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Actually, I think I'm just bored and wanted to say something
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to get current time
    By tsubasa in forum C Programming
    Replies: 3
    Last Post: 05-01-2009, 02:03 AM
  2. Replies: 11
    Last Post: 03-29-2009, 12:27 PM
  3. Help with assignment!
    By RVDFan85 in forum C++ Programming
    Replies: 12
    Last Post: 12-03-2006, 12:46 AM
  4. calculating user time and time elapsed
    By Neildadon in forum C++ Programming
    Replies: 0
    Last Post: 02-10-2003, 06:00 PM
  5. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 10:12 PM