Skip to content

Practice Most Popular Video Creator

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Medium#2456
LeetCode Problem

Most Popular Video Creator

Problem Statement

Video i has creator creators[i], identifier ids[i], and views[i] views. Creator popularity is the sum across all their videos, including separately counted videos that happen to share an id. Return [creator,id] for every creator tied for highest popularity, where id is their most-viewed video identifier, breaking view-count ties lexicographically smallest. Result row order is arbitrary.

Source: Most Popular Video Creator on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
creators = ["alice","bob","alice","chris"], ids = ["one","two","three","four"], views = [5,10,5,4]
Output
[["alice","one"],["bob","two"]]

# Example 2

Input
creators = ["alice","alice","alice"], ids = ["a","b","c"], views = [1,2,2]
Output
[["alice","b"]]

Constraints

n == creators.length == ids.length == views.length
1 <= n <= 10^5
1 <= creators[i].length, ids[i].length <= 5
creators[i] and ids[i] consist only of lowercase English letters.
0 <= views[i] <= 10^5

Related LeetCode Problems

Practice more problems similar to Most Popular Video Creator.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.