please complete and debug the attached code.
It returns the permutations of a weird array of integers (Matrix) made like
position
0 1 2
|4| 1| 4|
|5| | 2|
|1| |
As you see, the number of elements is variable and each element is an open array of integers.
The code should return at each call in the output array Perm
(4,1,4)
(5,1,4)
(1,1,4)
(4,1,2)
(5,1,2)
(1,1,2)
The attached code mainly shows what I need.
You will need to complete and debug the code. The attached code won't even compile .
Please stick to the code skeleton as the current code must be used in a larger application. Any change should be agreed.
Please be sure to provide the final unit together with an EXE to test it.
All code must be in Delphi 5