How can I get specific elements of an array by having the sequence of indices, I do it now by following:
val indices = Array(1,3,3,2)
val a = Array("a","b","c","d","e","f")
indices.map(a(_))
the problem is if I want to make it a safe search I have to check a.contains or modify the indices. sometimes the indices is to big and I can not modify it fast. What is the best time/space solution?