Optiver 2026 New Grad 的 Online Assessment 整体强度不低,不是单纯刷 LeetCode 就能稳过的类型。
这套 OA 更像是在测试:
你是否具备成为量化交易系统工程师所需要的 工程思维、系统理解能力,以及高压环境下的稳定性。
下面将从 OA 结构 → 每一部分的真实题型 → 重点难点 → 面试衔接,完整拆解 Optiver 26 NG OA。
Optiver OA 总体结构概览
Optiver 25 NG OA 通常由 三大部分 组成:
- HackerRank 编程测试(2 题)
- Programming Knowledge Test(20 分钟选择题)
- Optiver Zap-N 游戏测评(60 分钟)
这三部分并不是独立存在的,而是 从不同角度评估同一个人。
Optiver Online Assessments 1 HackerRank test + more Here is a detailed breakdown:
- HackerRank Code:
- Code 1: LeetCode style questions in the medium to easy range. However, only that types of problem but solutions are not present worldwide.
- Code 2: Object-Oriented Design (OOD) Problem Statement: It is a longish problem statement and one needs to read it carefully.
- Programming Knowledge Test:
- Duration: 20 minutes.
- About 20 multiple-choice questions.
- Topics like data structures, system design and operating systems.
- Optiver Zap-N Game:
- Duration: 60 minutes
- 9 mini-games (Between 2–15 mins each), If you can, use a mouse for these games.
- Balloon challenge, code comparison and number blocks were the games they had.
Optiver OA 1
要求构建一个日志服务器,用于处理大量的日志消息。每条消息包含一个唯一的整数日志 ID 和一个整数时间戳。我们的服务器由于存储限制,只能在传入请求时返回一小时内的最多 m 条最新日志。
需要实现三个方法:
recordLog(logId, timestamp):根据日志Id记录日志。getLogs():返回的整数列表中应包含前一小时最多的 m 条日志 ID,按时间戳升序列出。如果时间戳相同,则顺序为记录到日志服务器的顺序。getLogCount():返回最近一小时内的日志总量。
样例输入100
10
RECORD 1 0
RECORD 2 300
COUNT
RECORD 3 1200
RECORD 1 1800
GET_LOGS
COUNT
RECORD 4 3900
GET_LOGS
样例输出1,2
1,2,3,1
4
class LogServer:
def __init__(self, m):
self.logs_dict = {} # 存储日志ID及其时间戳
self.m = m # 最大日志数量限制
self.log_ids_queue = [] # 保存最近m个日志ID的队列
def recordLog(self, logId, timestamp):
# 更新日志ID的时间戳
if logId in self.logs_dict:
self.logs_dict[logId].append(timestamp)
else:
self.logs_dict[logId] = [timestamp]
# 更新日志ID队列
while len(self.log_ids_queue) >= self.m:
oldest_log_id = self.log_ids_queue.pop(0)
del self.logs_dict[oldest_log_id]
self.log_ids_queue.append(logId)
def getLogs(self):
# 返回最近一小时内的最新m个日志ID
current_time = time.time()
one_hour_ago = current_time - 3600
sorted_logs = sorted(
self.logs_dict.items(),
key=lambda x: (x[1][-1], self.logs_dict[x[0]][-1])
)
recent_logs = [
logId for logId, timestamps in sorted_logs
if timestamps[-1] > one_hour_ago
]
return ",".join(str(logId) for logId in recent_logs[:self.m])
def getLogCount(self):
# 返回最近一小时内的日志总数
current_time = time.time()
one_hour_ago = current_time - 3600
return sum(
len(timestamps)
for logId, timestamps in self.logs_dict.items()
if timestamps[-1] > one_hour_ago
)
Optiver OA 2
给定一个进程列表,每个进程都有一个唯一的PID(进程标识符)、开始时间和结束时间。此外还有一组进程之间的依赖关系。调度器只能在整数时间单位上安排进程的开始或结束,例如1、2、1000、999999等,而不是1.5、700.1等非整数值。
任务是实现一个Scheduler类,包含构造函数和PrintSchedule方法。构造函数接受进程列表和依赖关系,PrintSchedule方法不带任何参数。
样例输入:1 2 100 2100 110 2200 200 2330 1 2 2 2
样例输出:1 100 110 200 2100 2200 2330
思路:
为了解决这个问题,我们可以使用拓扑排序。首先,我们需要计算每个进程的最晚开始时间,即它必须在其所有依赖项完成之后才能开始。然后,我们可以使用拓扑排序来确定正确的进程执行顺序。最后,我们将找到满足所有约束条件的最大持续时间即可。
import heapq
class Scheduler:
def __init__(self, processes, dependencies):
self.processes = {pid: (start, end) for pid, start, _ in processes}
self.dependencies = dependencies
self.in_degrees = {
pid: 0 for pid in range(1, max(self.processes.keys())+1)
}
for dep in dependencies:
self.in_degrees[dep[1]] += 1
self.schedule = []
def PrintSchedule(self):
self.topological_sort()
earliest_start = min(p[0] for p in self.processes.values())
latest_end = max(p[1] for p in self.processes.values())
duration = latest_end - earliest_start
print(*sorted(pid for pid in self.schedule), sep=" ")
def topological_sort(self):
queue = []
for pid, (_, end) in self.processes.items():
if self.in_degrees[pid] == 0:
heapq.heappush(queue, (-end, pid))
while queue:
_, pid = heapq.heappop(queue)
self.schedule.append(pid)
for dependent in self.dependencies.get(pid, []):
self.in_degrees[dependent] -= 1
if self.in_degrees[dependent] == 0:
heapq.heappush(
queue, (-self.processes[dependent][1], dependent)
)
@staticmethod
def read_input():
n_p, n_d = map(int, input().split())
processes = [tuple(map(int, input().split())) for _ in range(n_p)]
dependencies = [tuple(map(int, input().split())) for _ in range(n_d)]
return processes, dependencies
def run_all_test_cases(self):
t = int(input())
for _ in range(t):
processes, dependencies = self.read_input()
Scheduler(processes, dependencies).PrintSchedule()
if __name__ == "__main__":
Scheduler([], []).run_all_test_cases()
Recruiter面试:
- Education background confirmation. Sponsorship.
- Why this position, why quantitative trading?
- Why Optiver?
- Do you have something that you have been sticking to for years?
- Can you tell me a period (from your internships) that you receive bad remarks?
- What are their potential competing candidates and other companies that they should pay attention to?
- What are the key factors you pay attention to when choosing companies?
- Which office prefer? Chicago or Houston?
Learn More
Optiver OA Leetcode–Senior Software Engineer
Glassdoor: Optiver OA Question
Optiver Intern OA summer 24 Reddit
Optiver 2026 已开启,你准备好迎接地狱级 OA 的挑战了吗?
还在为 HackerRank 冗长的 OOD 题目发愁?还是在 CodeSignal 的倒计时面前大脑空白? 我们提供 HackerRank、牛客网、CodeSignal、Codility 等主流平台专业代写服务:
- 全案通过: 资深算法大牛坐镇,确保 Test Cases 100% 全绿通过,不全过不收费。
- 无痕操作: 独家远程技术实现,物理级隔离,规避平台监控,确保账号绝对安全。
- 全题型覆盖: 无论是 LeetCode 硬核算法、复杂 OOD 架构,还是系统设计,通通不在话下。 让面试机会不再流失,用满分战绩开启大厂之门。
[立即咨询,预定你的大厂入场券]