题目叫most popular videos.
Let’s say you are running a website that shows videos to users. As a service owner, you want to get real-time data on how often each video is viewed and how popular the videos are.
Please implement the following functions to support this feature:
videoViewed: called when a video is viewed to keep track of how frequently a particular video is viewed.
getRanking: return how popular a particular video is, in order of number of views.
getTopVideos: return a list of the 10 most popular videos.
You should expect that getRanking is called more frequently than videoViewed.