0602. Friend Requests II: Who Has the Most Friends
https://leetcode.com/problems/friend-requests-ii-who-has-the-most-friends
Description
In social network like Facebook or Twitter, people send friend requests and accept others' requests as well.
Table request_accepted
Write a query to find the the people who has most friends and the most friends number under the following rules:
It is guaranteed there is only 1 people having the most friends.
The friend request could only been accepted once, which mean there is no multiple records with the same requester_id and accepter_id value.
For the sample data above, the result is:
Follow-up: In the real world, multiple people could have the same most number of friends, can you find all these people in this case?
ac
Last updated