From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,97188312486d4578 X-Google-Attributes: gidfc89c,public X-Google-Thread: 103376,97188312486d4578 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,baaf5f793d03d420 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,6154de2e240de72a X-Google-Attributes: gid1014db,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Teaching sorts [was Re: What's the best language to start with?] Date: 1996/08/22 Message-ID: #1/1 X-Deja-AN: 175848059 distribution: inet references: <4v2qkd$40f@news1.mnsinc.com> <4vd05f$rt5@news1.mnsinc.com> <01bb8f1b$ce59c820$32ee6fce@timhome2> <4vfe33$dg6@druid.borland.com> <4vhm8t$hdg@news1.mnsinc.com> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.c,comp.lang.c++,comp.unix.programmer,comp.lang.ada Date: 1996-08-22T00:00:00+00:00 List-Id: Szu-Wen says "I understand your point, and I agree with you in the strictest technical sense. However, it doesn't help at all if you tell somebody your algorithm is O(n) when it's actually O(1000n) in a certain range of n. Think about it - what do we use time complexity for? To predict behavior as n increases from our test case (usually smaller) to our real case (usually bigger). If the statement of the algorithm does not make it obvious that f(x) in O(f(x)) is not a continuous function, I believe it is the failing of the statement." O(n) is the same as O(1000n). I trust this is clear to you now if you have followed this thread. If you naively use big-O notation to predict behavior, you will get into trouble!