You are viewing a single comment's thread. Return to all comments →
Here's a Scala implementation
arr.flatMap(List.fill(num)(_))
Seems like cookies are disabled on this browser, please enable them to open this website
List Replication
You are viewing a single comment's thread. Return to all comments →
Here's a Scala implementation