Loading...

The Email Ranker

A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
medium
Seniority
junior, mid, senior

Problem

The growth team wants to rank users by email activity to identify power users. Given email activity records (dicts with 'user_id' and 'action'), rank all users by total activity count descending. Break ties alphabetically by user_id. Return a list of dicts with 'user_id', 'activity_count', and 'rank' using dense ranking.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.