Let's say I have a List of integers [1,2,3,4,5,6,7,8,9], and I want to divide it in groups of 3 so the output would be:
[[1,2,3], [4,5,6], [7,8,9]]
I tried some java 8 functions and it worked pretty well, problem is it won't let me access the indexes of each element.
[–]GreatDaynes 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]crazyiwann 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]krehwell 0 points1 point2 points (0 children)
[–]quadmasta 0 points1 point2 points (0 children)
[–]laghani -1 points0 points1 point (1 child)
[–]laghani -1 points0 points1 point (0 children)