← 返回 amazon 的题目列表Find Post with Maximum Likes
类型:online_judge
amazon
Implement a function to find the post with the maximum number of likes. You are provided a list of posts, each containing an identifier and a total number of likes. Your task is to return the identifier of the post with the most likes.
Input: A list of posts where each post is a list consisting of two elements, a string identifier and an integer number of likes. Output: A string identifier.
Example:
Input: [["post1", 10], ["post2", 20], ["post3", 15]]
Output: "post2"
Constraints:
The total number of posts will not exceed 1000.
The number of likes for each post will not exceed 10000.
Example
Input
[["post1", 10], ["post2", 20], ["post3", 15]]