solution with a simple join


  • 0
    K
    select a.follower, count(a.followee) as num 
    from follow a
    join follow b on a.follower = b.followee
    group by a.follower
    order by a.follower
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.