What's the downside of TimSort?

Asked 1 years ago, Updated 1 years ago, 370 views

I studied Tim Sort to measure the time complexity during the corte, and I'm organizing this. I was organizing when and why I use this. But I can't find anything to write about the shortcomings, and I can't think of any.

The time is significantly better than other alignments, and the memory is also O(n) compliant. I can't find any disadvantages (?) except that Insertion Sort is conducted internally for Run.

What do you think is the disadvantage of TimSort?

algorithm

2023-02-02 23:22

1 Answers

As you said, there are no shortcomings in time.

However, memory usage O(N), which the algorithm uses additionally (except for memory usage in the array), is less efficient than O(log N) in Quicksort.

The degree of complexity in implementation can be considered a disadvantage, but if you consider Timsort, I don't think it's meaningful.


2023-02-03 02:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.