It is necessary to implement the enumeration of all possible combinations of points of discharge. For example, the route is built as follows: 1 2 3 4 5
I need to get all the possible combinations.
1 3 2 4 5
2 1 3 4 5
etc.
Please give a push where to drip, how to implement. The goal is to sort through all possible route options and choose the best one based on the amount of mileage on the flight. The software is made in winforms, it works with the database, is it possible to do this iteration better in the software itself or all the same in SQL? Saw a bunch of crutches for c # with a bunch of for , I don’t like this option.