← 返回 uber 的题目列表Find Index of Max Rate to Price Ratio
类型:online_judge
Given two arrays rates and prices, return the index i where rates[i] / prices[i] is the maximum. The output should be the index, not the ratio itself.
Example:
rates = [1, 2, 3]
prices = [10, 2, 6]
Output: 1
Explanation: rates[1]/prices[1] = 2/2 = 1 is the maximum ratio.
Example
Input
rates = [1, 2, 3]
prices = [10, 2, 6]