Open Aziull opened 4 years ago
Advantages of radix sort It is stable because it preserves existing order of equals keys. It is good on small keys. Disadvantages of radix sort It is not efficient on very long keys because the total sorting time is proportional to key length and to the number of items to sort. We have to write an unconventional compare routine. It requires fixed size keys and some standard way of breaking the keys to pieces.
Переваги:
Недоліки:
D04.14. Advantages and disadvantages of non-comparison sorts (radix sort, counting sort, bucket sort,…)? These were discussed during lectures:
Advantages: •Work for linear time •Do not need comparators (also drawback?)
Disadvantages: •need extra memory •some extra is needed information about objects •the key cannot be changed sorting •work very slowly for large quantities unique items (or if others are violated requirements) •Vulnerable
Це було обговорено під час лекції:
Переваги: •Працюють за лінійний час •Не потребують компараторів (також і недолік?)
Недоліки: •потребують додаткової пам'яті •необхідна якась додаткова інформація про об'єкти •неможливо змінити ключ сортування •дуже повільно працюють для великої кількості унікальних елементів (або якщо порушені інші вимоги) •Вразливі