I am trying to reverse a sublist in a List using the indices provided in a multidimensional List. I don’t have much experience using multidimensional lists/arrays. I don’t understand why this doesn’t work. The output of this code using [[0,1], [1, 3]] as the indecies is: but it should be: Can someone please help point me in the right direction?
Tag: sublist
Split a list into n sublists in all possible ways
I want to split a list into a given number n sublists in all possible ways in Java. For example [1, 2, 3, 4] where n = 3 would include the following lists (but would not be a complete solution – complete would require much more space): etc I adapted a solution from another similar question (Split a list into