Complexitatea sortării python

Exemple de cod

3
0

complexitatea sortării python

nlog2n. 

As others have mentioned, the built-in sorting algorithm of Python uses a special version of merge sort, called Timsort, which runs in  nlog2n  time.

That’s pretty good; we generally can’t get much better than  nlog2n (with the exception of sorts which are slightly optimized for certain arrangements of data).

You can read more about how Timsort works (it’s pretty cool!) here:
3
0

python fel complexitate

nlog2n. 

As others have mentioned, the built-in sorting algorithm of Python uses a special version of merge sort, called Timsort, which runs in  nlog2n  time.

That’s pretty good; we generally can’t get much better than  nlog2n (with the exception of sorts which are slightly optimized for certain arrangements of data).

You can read more about how Timsort works (it’s pretty cool!) here:

Pagini similare

Pagini similare cu exemple

În alte limbi

Această pagină este în alte limbi

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................