Domanda di colloquio di Yelp

What is Big O notation?

Risposte di colloquio

Anonimo

8 ago 2014

Definition: A theoretical measure of the execution of an algorithm, usually the time or memory needed, given the problem size n, which is usually the number of items. Informally, saying some equation f(n) = O(g(n)) means it is less than some constant multiple of g(n).

1

Anonimo

22 ott 2014

O(N) is the big O notation, it gives the time complexity of the algorithm. A algorithm accessing N elements of an array would require N-1 steps, then the time complexity or the big O notation of it is O(N).