 The concept behind Shellsort is that insertion sort performs in time, where k is the greatest distance between two out-of-place elements.This means that generally, they perform in "O"("n"2), but for data that is mostly sorted, with only a few elements out of place, they perform faster.So, by first sorting elements far away, and progressively shrinking the gap between the elements to sort, the final sort computes much faster.