Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
33
Task/Sort-an-integer-array/Julia/sort-an-integer-array.jl
Normal file
33
Task/Sort-an-integer-array/Julia/sort-an-integer-array.jl
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
julia> a = [4,2,3,1]
|
||||
4-element Int32 Array:
|
||||
4
|
||||
2
|
||||
3
|
||||
1
|
||||
julia> sort(a) #out-of-place/non-mutating sort
|
||||
4-element Int32 Array:
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
|
||||
julia> a
|
||||
4-element Int32 Array:
|
||||
4
|
||||
2
|
||||
3
|
||||
1
|
||||
|
||||
julia> sort!(a) # in-place/mutating sort
|
||||
4-element Int32 Array:
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
|
||||
julia> a
|
||||
4-element Int32 Array:
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
Loading…
Add table
Add a link
Reference in a new issue