1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Optimizing Code in Java

Connected

अभ्यास

Implementing a social network

You're developing a social networking application that needs to analyze potential connections between users. You need to implement a method that generates all possible pairs of users from a list.

निर्देश

100 XP
  • For each index i, assign the ith user in elements as the first element of the pair.
  • For each index j, assign the jth user in elements as the second element of the pair.
  • Return the result with all your pairs.