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 nnn, where Capacity[i] (all values distinct) represents the capacity of server iii. The servers are naturally indexed 000 through n-1n-1n-1.
The distance between server i and server j is
Each server iii 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 uuu to server vvv,
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 mmm, representing the starting popularity of each reel. - An integer array
newReelImpactsof length nnn, where each element is the daily boost feature released by TikTok. - An integer kkk (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 iii from 0 to n-1n-1n-1).
a. AppendnewReelImpacts[i]to the list of existing reel impacts.
b. Identify the kkkth largest impact among all reels now available.
c. Add that kkkth-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.
Reference
OA proxy, interview proxy, interview assistance. Contact us for an open and transparent quotation, and interview support.