Question d’entretien chez Barclays

How to write a function that takes an array of numbers and returns randomized array