I want to achieve following things
Example
array[1,2,3,4,5,6,7,8,9,10,11,12]
and an integer i
. Every time I want to get an i-length sub-array from this array. If i=3
Expected/Required Output : get a sub-array [1,2,3] in first time, in second time I get[4,5,6]. Is there anyway to do that efficiently.