← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
You are given a list of content IDs that users have viewed and an integer k. Your task is to implement a function that returns the k most popular content IDs sorted by their popularity (number of views) in descending order. If two or more content IDs have the same popularity, sort them lexicographically (alphabetically) to ensure consistent ordering.