Statement 1: Shell sort is a stable sorting algorithm. Statement 2: Shell sort is an in-place sorting algorithm.

Statement 1: Shell sort is a stable sorting algorithm. Statement 2: Shell sort is an in-place sorting algorithm. Correct Answer Statement 2 is true but statement 1 is false

In Shell sort, the relative order of elements with equal values may change. Therefore, it is not a stable sorting algorithm. Shell sort is an in-place sorting algorithm as it requires O(1) auxiliary space.

Related Questions

Why is insertion sort preferred over other sorting algorithms (like selection sort, bubble sort etc.) for Tim sort implementation?
Tim sort begins sorting the given array by using which of the following sorting algorithm?
Why is insertion sort preferred over other sorting algorithms (like selection sort, bubble sort etc.) for introsort implementation?