Ads Ranking Algorithm

Asked at Meta · Coding & Leetcode-style Questions · Difficulty: Medium

Assume you are responsible for the ranking algorithm of an advertisement platform. Your task is to rank ads based on a set of metrics. Implement a Python function that takes a list of ads with their metrics and returns a list of ad IDs ordered by rank. The metrics are Click-Through Rate (CTR), Bid, and Expected Clicks.

Loading the problem…