Shuffle an array in Swift
Swift now comes with built in shuffle functionality. Swift provides two methods shuffle() Shuffle reorders a collection in place. After calling shuffle on the collection the original collection is changed/reordered Since shuffle() is mutating in nature you cannot use it with constant declared using let keyword. It has a complexity of O(n), where n is the length … Read more