提到對沖基金里的「技術崗天花板」,Hudson River Trading(HRT)一定榜上有名! 他們家的 OA 一直以難度高、時間緊、數學基礎要求極高著稱,很多 LeetCode 大佬都在這一關翻車。 這篇我們就來詳細拆解一下 HRT OA 流程、真題類型、常見坑點 + 我們的學員真實上岸經驗,希望能給正在準備 HRT 的你一點信心!

HRT OA 流程總覽(SWE 崗位)
HRT 的 OA 通常分兩大部分,時長 90 分鐘:
Coding
這部分一般會有兩道主程式設計題,整體難度偏 LeetCode hard,考察的知識點非常典型,比如圖論、並查集、動態規劃、貪心策略、堆優化、甚至是離散化處理。 題目本身通常和真實交易系統場景有一定聯繫,所以不僅要代碼寫得對,還得邏輯清晰、思路完整,最好還能講出時間複雜度優化。 面試官會特別關注你有沒有把 corner case 想清楚,變數命名是否規範,整體代碼結構是否“能上線”。
數學推理 + 快速思維題
這一部分更像 IQ 測試或數學建模比賽,通常是 10 到 20 道小題,內容覆蓋概率、排列組合、線性代數、幾何計算、甚至是一些 mental math 速算技巧。 難度不一定特別高,但很講究節奏感和抗壓能力,因為題量大、時間緊,基本要求你在短時間內快速建模、推理、算出結果並 move on。 建議提前練習,建立題感,並學會判斷哪些題值得多花時間,哪些該果斷放棄。
很多同學看到這一套組合就秒慫了,說到底,這種題目靠的不是一時的靈光,而是平時有沒有高品質地練習過、有沒有在限時環境下做過類比。 考試節奏控制、取捨判斷、以及對高頻考點的熟悉程度,才是真正拉開差距的地方。
真題回憶(2025 年整理)
1. Code Cleaning
Which of the following is a valid way to clean up the code below?
const strA = "test";
const strB = "demo";
let hashA = 0;
for (let i = strA.length; i >= 0; i--) {
const code = strA.charCodeAt(i);
hashA *= 37;
hashA += code;
}
let hashB = 0;
for (let i = strB.length; i >= 0; i--) {
const code = strB.charCodeAt(i);
hashB *= 37;
hashB += code;
}
2. Class Refactoring
The Chef
and Waiter
classes both have a similar printDetails
method. How can you refactor the code to reduce duplication?
class Chef {
printDetails() {
console.log("Staff ID: " + this.id);
}
}
class Waiter {
printDetails() {
console.log("Staff ID: " + this.id);
}
}
Options
- Replace
this.id
with a getter method to encapsulate the member variable. - Change the
printDetails
method totoString
and use it for console output. - Move the
printDetails
method to a superclass. - Create a standalone
printDetails
function and call it from both classes.
3. Heap Sort Characteristics
Which statement about heap data structures and their use in sorting is correct?
Options
- Heap sort has a time complexity of O(n log n), and building a heap of n elements takes O(n) time.
- Heap sort has a time complexity of O(n log n), and building a heap takes at least O(n log n) time.
- Heap sort has a time complexity of O(n²), and building a heap takes at least O(n log n) time.
- None of the above.
4. Card Game Winner
Alice and Bob each have a deck of numbered cards. They take turns discarding or flipping cards from the top. The game starts with a random call of“Even” or “Odd”:
If “Even” is called, both flip their top cards and compute scores (their card value minus the opponent’s).
If “Odd” is called, both discard their top cards first, then flip the next card and compute scores.
Subsequently, they alternate discarding one card and flipping the next until all cards are used. The player with the higher score wins; if scores are equal, it’s a tie.
Example
Alice’s cards: [6, 8, 10]
Bob’s cards: [5, 7, 9]
Starting with “Odd”:
Alice’s Card | Bob’s Card | Alice’s Score | Bob’s Score |
---|---|---|---|
8 (discard 6) | 7 (discard 5) | 8 – 7 = 1 | 7 – 8 = -1 |
10 (discard 8) | 9 (discard 7) | 10 – 9 = 1 | 9 – 10 = -1 |
Total | 2 | -2 | |
Result: Alice wins |
Function Requirement
Complete the determineWinner
function with parameters:
aliceCards
: Array of Alice’s card values.
bobCards
: Array of Bob’s card values.
startType
: Starting call (“Even” or “Odd”).
Return: “Alice”, “Bob”, or “Tie”.
5. Optimal Binary String
Definitions:
A binary string consists of 0s and 1s.
A prefix of a string is any substring starting from the first character.
A non-empty binary string is “optimal” if:
- The number of 0s equals the number of 1s.
- Every prefix has at least as many 1s as 0s.
Example: 110010
is optimal, while 110101
is not.
Given an optimal binary string, you can swap adjacent optimal substrings to form the largest possible numerical value.
Example
Input: binStr = 101100111000
Swap the optimal substrings 10
and 1100111000
to get: 110011100010
.
Function Requirement
Complete the maximizeOptimalString
function with parameter:
binStr
: An optimal binary string.
Return: The largest possible string after swapping adjacent optimal substrings.
6. Binary Tree Node Type Query
Binary tree information is stored in the TREE
table. Write an SQL query to identify each node’s type ( ROOT
, INNER
, or LEAF
) and output results sorted by node ID in ascending order.
Table Structure
Column | Type | Description |
---|---|---|
ID | Integer | Node ID (1~1000) |
P_ID | Integer | Parent node ID (1~1000) |
Output FormatTREE.ID TYPE
Sample Input
TREE | |
---|---|
ID | P_ID |
3 | 5 |
6 | 5 |
8 | 10 |
12 | 10 |
5 | 9 |
10 | 9 |
9 | NULL |
Sample Output
3 LEAF
5 INNER
6 LEAF
8 LEAF
9 ROOT
10 INNER
12 LEAF
Programhelp 學員真實助攻案例|遠端無痕,完美完成 HRT OA
學員情況
我們之前協助過一位來自 UT Austin 的中國留學生,在備戰 HRT OA 的時候壓力其實挺大的。 他自己說最擔心的幾個點,一是程式設計題時間太緊,怕來不及考慮各種邊界情況; 二是數學邏輯題太新穎,跟他以前刷過的題完全不一樣; 三是英文題干理解起來太吃力,稍微沒看清楚就容易丟分; 最後是整個考試節奏不好把控,很怕一慌就順序錯亂、節奏崩盤。
Programhelp 團隊的 「遠端無痕」 策略
我們 Programhelp 團隊幫他定製了一套 「遠端無痕」 策略,確保整個過程穩定、安全、高效。 首先是在設備準備上,我們提前為他搭建了專屬的語音通道,用的是隱蔽耳機 + 加密傳音的方式,考試過程中我們即時給他傳輸題意解析和解題提示,尤其是在遇到繞口或陷阱型的題目時,能幫他迅速釐清思路。
為了確保他進入狀態,我們考前一周密集刷了 30 多道 HRT 高頻題,包括程式設計和邏輯題,並總結了一套 「題型範本」,讓他真正做到看到題目就知道從哪裡下手。 同時我們在考試過程中會通過語音輕聲提醒,比如 「這題可以先跳過」「還有 5 分鐘,開始檢查邊界情況」,説明他把節奏穩住,不被難題卡死。 程式設計部分我們也同步預判邏輯,像他在寫代碼的時候,我們後台即時推演題目邏輯,適時提醒他 “有沒有考慮空輸入?” “注意下重複數字的處理”,這些 edge case 一旦漏掉就很容易丟分,我們提前幫他兜住了。
無痕操作保障 + 場控節奏策略,成功斬獲 VO 邀約
最重要的是,全程都是無痕執行。 我們提前做了語音測試、網路隔離、設備調試,整場考試下來,沒有留下任何異常記錄或可疑操作,確保穩妥、安全。 最後,他順利完成了所有程式設計題和大部分數學題,整體節奏掌控得非常好,很快就收到了 HRT 的後續 VO 邀約。
如果你也想在 HRT、Jane Street、Two Sigma 這類超高含金量量化崗的 OA/VO 中穩紮穩打,但又擔心節奏 / 題型 / 壓力處理不過關,歡迎隨時私信我們了解遠端無痕輔助方案,Programhelp 專業團隊全天候待命,為你保駕護航!