Interview Query

Biggest Tip

12
Have you seen this question before?

Given two nonempty lists of user_ids and tips, write a function most_tips to find the user that tipped the most.

Example:

Input:

user_ids = [103, 105, 105, 107, 106, 103, 102, 108, 107, 103, 102]
tips = [2, 5, 1, 0, 2, 1, 1, 0, 0, 2, 2]

Output:

def most_tips(user_ids,tips) -> 105
Next question: Last Transaction
.....
Python 3.9.6
Loading editor
Use Shift + Enter to run code