code: function merge( a, l, m, r ) {
      const n1 = m - l + 1;
      const n2 = r - m;
      const L = a.slice( l, m + 1 );
      const R = a.slice( m + 1, 1 + r );
  
      let i = 0, j = 0, k = l;
      while( i < n1 && j < n2 ) {
          if( L[ i ][ 0 ] <= R[ j ][ 0 ] ) {
              a[ k ] = L[ i ];
              i++;
          } else {
              a[ k ] = R[ j ];
              j++;
          }
          k++;
      }
  
      while( i < n1 ) {
          a[ k ] = L[ i ];
          i++;
          k++;
      }
  
      while( j < n2 ) {
          a[ k ] = R[ j ];
          j++;
          k++;
      }
  }
docs: function for merge sort