original_docstring:  Sort the elements of list using merge sort bottom-up iteration 
docstring: Sort the elements of list using merge sort bottom-up iteration
docstring_tokens: Sort the elements of list using merge sort bottom - up iteration
code: def mergesort_iter(S):
      ''' Sort the elements of list using merge sort bottom-up iteration '''
      n = len(S)
      logn = math.ceil(math.log(n,2))
      src, dest = S, [None] * n
      for i in (2**k for k in range(logn)):
          for j in range(0,n,2*i):
              _merge_iter(src,dest,j,i)
          src, dest = dest, src
      if S is not src:
          S[0:n] = src[0:n]
code_tokens: def mergesort_iter ( S ) : n = len ( S ) logn = math . ceil ( math . log ( n , 2 ) ) src , dest = S , [ None ] * n for i in ( 2 ** k for k in range ( logn ) ) : for j in range ( 0 , n , 2 * i ) : _merge_iter ( src , dest , j , i ) src , dest = dest , src if S is not src : S [ 0 : n ] = src [ 0 : n ]
short_docstring: Sort the elements of list using merge sort bottom-up iteration
short_docstring_tokens: Sort the elements of list using merge sort bottom - up iteration
comment: ''' Sort the elements of list using merge sort bottom-up iteration '''