Is there any way to build dynamic multi-dimensional arrays in Scala? I know arrays in Scala must be initialized in its sizes and dimensions, so I don\'t want that. The data stru
Well, it depends a lot on what you intend to do with it, but your best guess is IndexedSeq[IndexedSeq[T]] (or deeper nestings), using Vector as the implementation for IndexedSeq (it's the default implementation anyway).
For example:
scala> IndexedSeq(IndexedSeq(1, 2, 3), IndexedSeq(4, 5), IndexedSeq(6, 7, 8, 9)) res0: IndexedSeq[IndexedSeq[Int]] = Vector(Vector(1, 2, 3), Vector(4, 5), Vector(6, 7, 8, 9))