Результаты поиска по запросу "big-o"

22 ответа

Are there any cases where you would prefer a higher big-O time complexity algorithm over the lower one?

30 ответов

This type of algorithm is described as O(log N). The iterative halving of data sets described in the binary search example produces a growth curve that peaks at the beginning and slowly flattens out as the size of the data sets increase e.g. an input data set containing 10 items takes one second to complete, a data set containing 100 items takes two seconds, and a data set containing 1000 items will take three seconds. Doubling the size of the input data set has little effect on its growth as after a single iteration of the algorithm the data set will be halved and therefore on a par with an input data set half the size. This makes algorithms like binary search extremely efficient when dealing with large data sets.

предпочел как можно меньше формального определения и простую математику.

30 ответов

Есть ли O (1 / n) алгоритмы?

Есть ли O (1 / n) алгоритмы? Или что-нибудь еще, что меньше, чем O (1)?

ТОП публикаций