The Trade desk OA | Trade desk OA proxy | Trade desk ng 2026

1,412Views

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 | Trade desk OA proxy | Trade desk ng 2026

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

The Trade desk OA | Trade desk OA proxy | Trade desk ng 2026

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 initialReelImpacts of length mmm, representing the starting popularity of each reel.
  • An integer array newReelImpacts of 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:

  1. Initialization: Compute the kth largest value in initialReelImpacts and set this as the initial score.
  2. Day-by-day updates (for each day iii from 0 to n−1n-1n−1):
    a. Append newReelImpacts[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.

參考資料

Trade desk | 一亩三分地

Trade desk OA | leetcode

OA 代理、面談代理、面談協助。 聯絡我們 for an open and transparent quotation, and interview support.

author avatar
Alex Ma Staff Software Engineer
目前就職於Google,10餘年開發經驗,目前擔任Senior Solution Architect職位,北大計算機本碩,擅長各種算法、Java、C++等編程語言。在學校期間多次參加ACM、天池大數據等多項比賽,擁有多項頂級paper、專利等。
END