b'\n_START_ARTICLE_\nShear sort\n_START_SECTION_\nC++\n_START_PARAGRAPH_\nvoid shear_sort(int v[][],int n,int m){_NEWLINE_        bool scambio=true;_NEWLINE_        while (scambio){_NEWLINE_        scambio=false;_NEWLINE_    for (int i=0;i<n;i++){_NEWLINE_          if(i%2==0) {_NEWLINE_           for (int j=0;j<m-1;j++){_NEWLINE_            if(v[i][j]>v[i][j+1]) {_NEWLINE_              swap(v[i][j],v[i][j+1]);_NEWLINE_          scambio=true;_NEWLINE_        }_NEWLINE_           }_NEWLINE_      }_NEWLINE_      else if(i%2!=0){_NEWLINE_           for (int j=m-1;j>0;j--){_NEWLINE_            if(v[i][j]>v[i][j-1]) {_NEWLINE_             swap(v[i][j],v[i][j-1]);_NEWLINE_         scambio=true;_NEWLINE_        }_NEWLINE_           }_NEWLINE_      }_NEWLINE_    }_NEWLINE_for (int j=0;j<m;j++){_NEWLINE_  for (int i=0;i<n-1;i++){_NEWLINE_        if(v[i][j]>v[i+1][j]) {_NEWLINE_          swap(v[i][j],v[i+1][j]);_NEWLINE_          scambio=true;_NEWLINE_        }_NEWLINE_   }_NEWLINE_  }_NEWLINE_ }_NEWLINE_}'