Jump to content

Sorting algorithms/Merge sort: Difference between revisions

m
→‎{{header|Julia}}: update for v. 1.0+
m (→‎{{header|Julia}}: update for v. 1.0+)
Line 4,591:
 
=={{header|Julia}}==
{{works with|Julia|0.6}}
 
<syntaxhighlight lang="julia">function mergesort(arr::Vector)
if length(arr) ≤ 1 return arr end
Line 4,611 ⟶ 4,609:
end
if li ≤ length(lpart)
copycopyto!(rst, i, lpart, li)
else
copycopyto!(rst, i, rpart, ri)
end
return rst
4,105

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.