lets say we have an array:
arr1 = [1,2,3,4,5]
& I want to print all pairs of 3 values from this list in the order it is: for ex, this is the output i want from the array above
output:
[1,2,3]
[2,3,4]
[3,4,5]
how can i achieve this in the simplest way possible without using libraries.