original array is broken in two parts left and right array
len1 , len2 = m - l + 1 , r - m NEW_LINE left , right = [ ] , [ ] NEW_LINE for i in range ( 0 , len1 ) : NEW_LINE INDENT left . append ( arr [ l + i ] ) NEW_LINE DEDENT for i in range ( 0 , len2 ) : NEW_LINE INDENT right . append ( arr [ m + 1 + i ] ) NEW_LINE DEDENT i , j , k = 0 , 0 , l NEW_LINE