Problem 23
This commit is contained in:
1 parent
96ab3811fa
commit
5935fcca99
2 files changed
+20
No files matched your search
@@ -0,0 +1,7 @@
|
||||
package ninetyNineScalaProblems
|
||||
|
||||
import scala.util.Random
|
||||
|
||||
object Problem23:
|
||||
def randomSelect(n: Int, list: List[Any]): List[Any] =
|
||||
Problem18.slice(0, n, Random.shuffle(list))
|
||||
Reference in new issue
Block a user