August 27, 2024
P25 - Generate a random permutation of the elements of a list.
Hint: Use the solution of problem P23.
Example:
scala
scala> randomPermute(List('a, 'b, 'c, 'd, 'e, 'f))
res0: List[Symbol] = List('b, 'a, 'd, 'c, 'e, 'f)
August 27, 2024
Hint: Use the solution of problem P23.
Example:
scala
scala> randomPermute(List('a, 'b, 'c, 'd, 'e, 'f))
res0: List[Symbol] = List('b, 'a, 'd, 'c, 'e, 'f)
Don't have an account? We will create one for you.
Enter the OTP send to
in seconds. Check your spam folder if you can't find email from us.
Valid email is required for further communications