L
L
Lici2014-07-11 21:32:59
PHP
Lici, 2014-07-11 21:32:59

How to solve problems in O(f) or o(f) in programming?

In the university (physics) there was something on the topic "O" big and "O" small, but it was studied very superficially. Now I see that it is needed in IT.
What is it, how do you know it, and why does everyone want to solve problems in less than O(f) ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Calc, 2014-07-11
@Calc

1) ALGORITHMS
CONSTRUCTION AND ANALYSIS
Thomas H. Cormen
Charles E. Leiserson
Ronald L. Rivest
Clifford Stein
2) the fewer iterations of the cycle (cycles) in the task, the less time it takes to complete it.
Example
we have a sorted array
in it we need to find 17
There is a choice: brute force search or binary search

Y
yttrium, 2014-07-11
@yttrium

We are talking about asymptotic or computational complexity
wikipedia
the fastest algorithm is when its asymptotic complexity = O (1)
This is not physics, this is mathematics.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question