all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
35
Task/Sort-an-integer-array/Julia/sort-an-integer-array.julia
Normal file
35
Task/Sort-an-integer-array/Julia/sort-an-integer-array.julia
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
julia> a = [4,2,3,1]
|
||||
4-element Int32 Array:
|
||||
4
|
||||
2
|
||||
3
|
||||
1
|
||||
julia>#non-mutating sort
|
||||
sort(a)
|
||||
4-element Int32 Array:
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
|
||||
julia> a
|
||||
4-element Int32 Array:
|
||||
4
|
||||
2
|
||||
3
|
||||
1
|
||||
|
||||
julia>#mutating sort
|
||||
sort!(a)
|
||||
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