Diferente pentru blog/numbers-everyone-should-know intre reviziile #24 si #23

Nu exista diferente intre titluri.

Diferente intre continut:

The table below shows the limits that can be reached in a few seconds by algorithms of different complexities, n being the input size. I've added some algorithms and data structure examples for each complexity class.
|_. maximum n |_. complexity |_. algorithms |_. data structures|
| 1,000,000,000 | log n, sqrt n | binary search, ternary search, fast exponentiation, euclid algorithm |   |
| 10,000,000 | n, n log log n, n log* n | set intersection, Eratosthenes sieve, radix sort, KMP, topological sort, Euler tour, strongly connected components, 2sat | disjoint sets, tries, hash_map, 'rolling hash':blog/rolling-hash deque|
| 1,000,000 | n log n | sorting, divide and conquer, sweep line, Kruskal, Dijkstra | segment trees, range trees, heaps, treaps, binary indexed trees, suffix arrays |
| 100,000 | n log^2^ n| divide and conquer | 2d range trees |
| 50,000 | n^1.585^, n sqrt n| Karatsuba, 'square root trick':blog/square-root-trick |two level tree |
| 1000 - 10,000 | n^2^ | largest empty rectangle, Dijkstra, Prim (on dense graphs) |   |
| 300-500 | n^3^ | all pairs shortest paths, largest sum submatrix,  matrix multiplication, matrix chain multiplication, network flow |   |
| 30-50 | n^4^, n^5^, n^6^ |   |   |
| 25 - 40 | 3^n/2^, 2^n/2^ | 'meet in the middle':blog/meet-in-the-middle | hash tables (for set intersection) |
| 15 - 24 | 2^n^ | subset enumeration, brute force, dynamic programming with exponential states |   |
| 15 - 20 | n^2^ 2^n^ | dynamic programming with exponential states | bitsets, hash_map |
| 13-17 | 3^n^ | dynamic programming with exponential states | hash_map (to store the states) |
| 11 | n! | brute force, backtracking, next_permutation |   |
| 8 |  n^n^ | brute force, cartesian product |   |
| 11 | n! | brute force, backtracking, next_permutation |   |
| 13-17 | 3^n^ | dynamic programming with exponential states | hash_map (to store the states) |
| 15 - 20 | n^2^ 2^n^ | dynamic programming with exponential states | bitsets, hash_map |
| 15 - 24 | 2^n^ | subset enumeration, brute force, dynamic programming with exponential states |   |
| 25 - 40 | 3^n/2^, 2^n/2^ | 'meet in the middle':blog/meet-in-the-middle | hash tables (for set intersection) |
| 30-50 | n^4^, n^5^, n^6^ |   |   |
| 300-500 | n^3^ | all pairs shortest paths, largest sum submatrix,  matrix multiplication, matrix chain multiplication, network flow |   |
| 1000 - 10,000 | n^2^ | largest empty rectangle, Dijkstra, Prim (on dense graphs) |   |
| 50,000 | n^1.585^, n sqrt n| Karatsuba, 'square root trick':blog/square-root-trick |two level tree |
| 100,000 | n log^2^ n| divide and conquer | 2d range trees |
| 1,000,000 | n log n | sorting, divide and conquer, sweep line, Kruskal, Dijkstra | segment trees, range trees, heaps, treaps, binary indexed trees, suffix arrays |
| 10,000,000 | n, n log log n, n log* n | set intersection, Eratosthenes sieve, radix sort, KMP, topological sort, Euler tour, strongly connected components, 2sat | disjoint sets, tries, hash_map, 'rolling hash':blog/rolling-hash |
| 1,000,000,000 | log n, sqrt n | binary search, ternary search, fast exponentiation, euclid algorithm |   |
These numbers aren't very precise, they assume in memory operations and some varying constant factors, but they do give a good starting point in your search for a solution that fits your problem and your data size.

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.