1729. Find Followers Count LeetCode Solution
In this guide, you will get 1729. Find Followers Count LeetCode Solution with the best time and space complexity. The solution to Find Followers Count problem is provided in various programming languages like C++, Java, and Python. This will be helpful for you if you are preparing for placements, hackathons, interviews, or practice purposes. The solutions provided here are very easy to follow and include detailed explanations.
Table of Contents
- Problem Statement
- Complexity Analysis
- Find Followers Count solution in C++
- Find Followers Count solution in Java
- Find Followers Count solution in Python
- Additional Resources

Problem Statement of Find Followers Count
Table: Followers
+————-+——+
| Column Name | Type |
+————-+——+
| user_id | int |
| follower_id | int |
+————-+——+
(user_id, follower_id) is the primary key (combination of columns with unique values) for this table.
This table contains the IDs of a user and a follower in a social media app where the follower follows the user.
Write a solution that will, for each user, return the number of followers.
Return the result table ordered by user_id in ascending order.
The result format is in the following example.
Example not found
Constraints not found
Complexity Analysis
- Time Complexity: Google AdSense
- Space Complexity: Google Analytics
1729. Find Followers Count LeetCode Solution in C++
SELECT
user_id,
COUNT(follower_id) AS followers_count
FROM Followers
GROUP BY 1
ORDER BY 1;
/* code provided by PROGIEZ */
1729. Find Followers Count LeetCode Solution in Java
N/A
// code provided by PROGIEZ
1729. Find Followers Count LeetCode Solution in Python
N/A
# code by PROGIEZ
Additional Resources
- Explore all LeetCode problem solutions at Progiez here
- Explore all problems on LeetCode website here
Happy Coding! Keep following PROGIEZ for more updates and solutions.