Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 453 Bytes

File metadata and controls

12 lines (7 loc) · 453 Bytes

Shearsort

The Shearsort is a very simple algorithm for sorting two-dimensional arrays. The shearsort sorts the rows and the columns of the array in turn.

Computational Cost

The computational costs of shearsort are:

  • $T{\left(n \times n\right)} = n \log_{2}{n} + 3 n - 2$ the number of steps;
  • $C{\left(n \times n\right)} = \frac{n^3 \log_2{n}}{2} + \frac{3}{2} n^3 - \frac{n^2 \log_2{n}}{2} - \frac{5}{2} n^2 + n$ the number of comparators;