Sorting algorithms/Cocktail sort with shifting bounds: Difference between revisions
Sorting algorithms/Cocktail sort with shifting bounds (view source)
Revision as of 11:09, 22 July 2020
, 3 years agoSwift - use camel case
(Added Swift solution) |
m (Swift - use camel case) |
||
Line 833:
=={{header|Swift}}==
{{trans|Rust}}
<lang swift>func
var begin = 0
var end = a.count
Line 866:
var array = [5, 1, -6, 12, 3, 13, 2, 4, 0, 15]
print("before: \(array)")
print(" after: \(array)")
var array2 = ["one", "two", "three", "four", "five", "six", "seven", "eight"]
print("before: \(array2)")
print(" after: \(array2)")</lang>
|