Loading problem...
You are given accepted friendship request logs in table RequestAccepted.
Each row represents one accepted connection between two different users:
Interpret each row as an undirected friendship edge. That means both requester_id and accepter_id gain one friend from that row.
Task:
The test data guarantees exactly one user has the highest friend count.
Supported submission environments:
RequestAccepted:
| requester_id | accepter_id | accept_date |
|--------------|-------------|-------------|
| 1 | 2 | 2016-06-03 |
| 1 | 3 | 2016-06-08 |
| 2 | 3 | 2016-06-08 |
| 3 | 4 | 2016-06-09 |[{"id":3,"num":3}]User 3 is connected to users 1, 2, and 4, so their friend count is 3, which is the highest.
RequestAccepted:
| requester_id | accepter_id | accept_date |
|--------------|-------------|-------------|
| 10 | 20 | 2020-01-01 |
| 30 | 20 | 2020-01-02 |
| 40 | 20 | 2020-01-03 |
| 30 | 40 | 2020-01-04 |[{"id":20,"num":3}]User 20 appears in three accepted relationships, while other users appear fewer times.
RequestAccepted:
| requester_id | accepter_id | accept_date |
|--------------|-------------|-------------|
| 100 | 101 | 2021-04-01 |
| 102 | 101 | 2021-04-02 |
| 103 | 101 | 2021-04-03 |
| 104 | 103 | 2021-04-04 |
| 105 | 106 | 2021-04-05 |[{"id":101,"num":3}]User 101 appears in three accepted pairs, while every other user appears at most twice, so user 101 is the unique leader.
Constraints