0
I have an array say [1,2,3,4,5,6,7,8,9] i want to process an array in such a way that if n = 3 then first it should give subarray of [1,2,3] then [2,3,4],[3,4,5]....[7,8,9].
What I currently doing is running a for loop and making a sub array so is there any best way to achieve this using some sw...