MCPcopy Create free account
hub / github.com/HuberTRoy/leetCode / shuffle

Method shuffle

Array/ShuffleAnArray.py:54–59  ·  view source on GitHub ↗

Returns a random shuffling of the array. :rtype: List[int]

(self)

Source from the content-addressed store, hash-verified

52 return self.nums
53
54 def shuffle(self):
55 """
56 Returns a random shuffling of the array.
57 :rtype: List[int]
58 """
59 return random.sample(self.nums, len(self.nums))
60
61
62

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected