Apr-05-2023, 09:27 PM
(This post was last modified: Apr-05-2023, 09:27 PM by deanhystad.)
The op requested a solution that doesn't test all possible combinations. I don't that meant testing more than all possible combinations. On the other hand, your solution does take the order of the pair into account if order is important.