In this post let us explore the choose method available on Seq, List andArray module. Choose method re

Choose: Applies the given function f to each element x of the list. Returns the list that contains the results for each element where the function returns Some(f(x)).

The below table shows the computational complexity of the function for a collection of size N.

Function Array List Sequence
choose O(N) O(N) O(N)