I'm learning Java 8 lambdas and streams. So, I got an array of lists having varying lengths. Lists contain integers.
What would be the best way to collect vertical slices in another list of lists i.e collect all integers with index 0 from all original lists in slice 0, index 1 in slice 1 and so an until the length of the longest list (filling zeros for shorter lists)
I know it's trivial to hand code a couple of traditional loops for this but what about doing this using Java 8 features?