🔥✅✅ Dart Solution 📌📌 || with Explanation 👌👌
Solution
Initialization: We create a list received of size n + 1 to keep track of which friends have received the ball. The +1 is to match the friend numbering
# Solution

- **Initialization**: We create a list `received` of size `n + 1` to keep track of which friends have received the ball. The `+1` is to match the friend numbering (1-based indexing).
- **Simulation**: We start with the 1st friend and simulate the passing of the ball. The next friend is calculated using modulo arithmetic to handle the circular nature of the friends.
- **Termination**: The game ends when a friend receives the ball for the second time.
- **Losers**: After the game ends, we iterate through the `received` list to find friends who never received the ball and add them to the `losers` list.

### Time Complexity:

- The time complexity is `O(n)` in the worst case because we might have to pass the ball to all `n` friends before a friend receives the ball for the second time.
- The space complexity is `O(n)` due to the storage of the `received` array.

```dart
class Solution {
  List<int> circularGameLosers(int n, int k) {
    List<bool> received = List.filled(n + 1, false);
    int currentFriend = 1;
    received[currentFriend] = true;
    int turn = 1; 
    while (true) {
        int steps = turn * k;
        int nextFriend = (currentFriend + steps - 1) % n + 1;
        if (received[nextFriend]) {
            break;
        }
        received[nextFriend] = true;
        currentFriend = nextFriend;
        turn++;
    }
    List<int> losers = [];
    for (int i = 1; i <= n; i++) {
        if (!received[i]) {
            losers.add(i);
        }
    }
    return losers;
  }
}
```
['Dart']