I have a 1d list of integers like:
List<int> x = [1, 4, 2, 8, 9, 3, 6, 5, 7];
I want to convert this list to a 2d list like this:
List<List<int>> y = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
I have a 1d list of integers like:
List<int> x = [1, 4, 2, 8, 9, 3, 6, 5, 7];
I want to convert this list to a 2d list like this:
List<List<int>> y = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];