// A permutation of an array of integers is an arrangement of its members into a sequence or linear order. // For example, for arr = [1,2,3], the following are considered permutations of arr: [1,2,3], ...
/* keep iteration until the order is increasing from the last element. * When we finish the iteration, i will be at the index where i+1 was the last element * following the ascending order from the ...