Pair-Tournament design algorithm
问题 I'm trying to build a Javascript function that takes as an input: array of players e.g. ["player1","player2","player3","player4"] (probably only equal number of players) and dynamically creates an array for a tournament design based on the following rules: each player partners no more than once with the same player every player has an equal amount of total matches the outputs would be an array containing arrays of matches with four entries each e.g. [player1, player2, player3, player4] stands