Given an array of users, implement a function that generates random pairings such that each possible pairing configuration is equally likely. The pairing should follow these rules:
- Each pair is formed by randomly selecting two distinct users until fewer than two users remain.
- The pairing process must be uniformly random, ensuring that every valid set of pairings has an equal probability of being chosen.
- If the total number of users is odd, one user will remain unmatched.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Stdout
-