The Trade Desk OA tests algorithm skills, data structures, and problem-solving under time pressure. This guide shares real questions and tips to help you succeed.
The Trade desk OA Question 1
You are given an array capacity of length n, where capacity[i] (all values distinct) represents the capacity of server i. The servers are naturally indexed 0 through n−1.
The distance between server i and server j is
Each server i has exactly one closest neighbor—the server j≠i, whose capacity differs least from capacity[i]. (Uniqueness is guaranteed.)
You will receive mmm queries. Each query gives a pair (u,v), asking:
What is the minimum total cost to establish a connection path from server u to server v,
where you may chain together any number of operations of types 1 and 2?
Your task is to compute and return the minimum cost for each query.
Example
n = 3, capacity = [2, 7, 10]
queries = [(0,2), (1,2), (2,1)]
- Closest neighbors:
- Server 0 (cap 2) → server 1 (cap 7)
- Server 1 (cap 7) → server 2 (cap 10)
- Server 2 (cap 10) → server 1 (cap 7)
| Query | Best Path | Cost Calculation | Min Cost |
|---|---|---|---|
| (0→2) | 0 → 1 → 2 | 0→1 via op 2 = 1, 1→2 via op 2 = 1 | 2 |
| (1→2) | 1 → 2 | 1→2 via op 2 = 1 | 1 |
| (2→1) | 2 → 1 | 2→1 via op 2 = 1 | 1 |
The Trade desk OA Question 2
You are given:
- An integer array
initialReelImpactsof length m, representing the starting popularity of each reel. - An integer array
newReelImpactsof length n, where each element is the daily boost feature released by Trade desk. - An integer k (1 ≤ k ≤ current number of reels).
The creator’s total impact score is computed as follows:
- Initialization: Compute the
kthlargest value ininitialReelImpactsand set this as the initial score. - Day-by-day updates (for each day i from 0 to n−1):
a. AppendnewReelImpacts[i]to the list of existing reel impacts.
b. Identify the kth largest impact among all reels now available.
c. Add that kth–largest impact to the running total score.
Return the creator’s final total impact score after processing all nnn days.
Example
m = 2
initialReelImpacts = [2, 3]
n = 3
newReelImpacts = [4, 5, 1]
k = 2
Final total = 2 + 3 + 4 + 4 = 13.
參考資料
OA 代理、面談代理、面談協助。 聯絡我們 for an open and transparent quotation, and interview support.