Learn to create permutations recursively — We all have probably needed it at some point in our programming career: permutations, i.e. rearrangements of some given array. As an example, let us assume that we want to visit the four cities A, B, C, and D. These cities have some distance from each other, and of course…