8.3k views
4 votes
What is the analysis and complexity of a shell sortalgorithms?

1 Answer

3 votes

Answer: The shell sort is based on insertion sort. Here the list of elements are divided into smaller sub list which are sorted based on insertion sort.

Its best case time complexity is O(n* logn) and worst case is O(n* log^2 n)

Step-by-step explanation:

Shell sort is an inplace sorting here we begin by dividing the list into sublist and sorting the list with insertion sort. We create interval for dividing the list into sub list until we reach the smallest interval of 1.

The best case is O(n* logn).

User Saurabh Passolia
by
5.8k points