n clips. Clip i was made by authors[i], has id clips[i] and views[i] views. Ids are not unique: different clips may share one, yet they are still separate clips with their own view counts.
An author's popularity is the total number of views across all of their clips. Find the authors with the highest popularity (there may be several) and, for each of them, their most viewed clip. If an author has several clips tied for the most views, pick the one whose id comes first alphabetically.
Return a list of [author, id] pairs in any order.authors=["kim", "lee", "kim", "ann"], clips=["cat", "dog", "bee", "owl"], views=[4, 9, 5, 3] → [['kim', 'bee'], ['lee', 'dog']]
kim has 4 + 5 = 9 views, lee has 9, ann has 3. kim and lee share the lead. kim's best clip is bee (5 views); lee's only clip is dog.
authors=["max", "max"], clips=["zeta", "alfa"], views=[7, 7] → [['max', 'alfa']]
Both of max's clips have 7 views, so the alphabetically smaller id, alfa, is chosen.
authors=["sam", "tom"], clips=["a", "a"], views=[0, 1] → [['tom', 'a']]
authors, clips and views all have length nauthors and clips has 1 to 10 lowercase English lettersauthors=["kim", "lee", "kim", "ann"], clips=["cat", "dog", "bee", "owl"], views=[4, 9, 5, 3]
[['kim', 'bee'], ['lee', 'dog']]
Run checks the first 3 tests in your browser. Submit checks all 96 tests on the server, hidden ones included.