cpp
cpp copied to clipboard
Create print_permutations_1_to_n.cpp
This prints the permutations of the array [ 1, 2, 3, ..., n ], in lexicographical order.
I am creating a pull request for...
- [x] New algorithm
- [ ] Update to an algorithm
- [ ] Fix an error
- [ ] Other - Describe below
From line 4: Can you set the constant NMAX to a smaller value? Or even better use a container class like “vector”?
Please also remove lines 8 and 9