On Thu, 18 Aug 2005 04:20:52 UTC,

(E-Mail Removed) wrote:

> Hello:

>

> I have seen that many interviewers ask, so what is the Big O for that

> algorithm (say Binary Search) which is o(log n) + 1 (in most cases).

>

> I know what is the Big O for most algorithms, but I am wondering how

> can one derive the same ? I want to know if any places on the web have

> concrete proof or methodology to do so.

>

> Because of this Big O I have almost failed in an interview but my

> conscience refused to answer the question by memorization as I really

> don't know how to derive it mathematically.

>

> Sorry I am unable to afford a Data Structure course or buy expensive

> books. So if you know any good links kindly share else ignore this

> e-mail.

>

> Sorry for the spam if it's offtopic.

>

> Thanks you.
Hello,

Someone else has pointed out a link. Basically, Big O Notation is

just a way of expressing the complexity of a problem in terms of what

one thinks are the expensive operations of an algorithm. It is usually

expressed in the number of records or items that need to be processed.

Memorization is good to some degree. You won't have time to derive

the complexity for every task that you decide to check, so being able

to classify the problem is helpful. On the other hand, it is good

that you want to understand what the notation means and how it can be

helpful to you and your team.

David