CODING CHALLENGES

代码题库

用接近 LeetCode 的题表进入训练:先筛选题目,再进入双栏题面和编辑器。每道题只展示它实际声明支持的语言。

继续刷题

题目列表

显示 90 / 646 道可提交题。 当前筛选:标签:Microstructure,难度:中等

提交状态:未尝试未正确已正确
未尝试
coding-active-quote-peak-count可练习
报价引擎活跃集合:并发活跃报价的峰值数量

Quote Engine Active Set: Peak Concurrently-Live Quotes

中等免费版Python / C++ / Rust
未尝试
coding-arrival-price-vs-twap-decision订阅锁定
Arrival Price 与 TWAP 切片在 alpha 衰减下的决策

Arrival Price vs TWAP Decision under Alpha Decay

中等面试准备Python / C++ / Rust
未尝试
coding-best-pnl-state-with-cooldown可练习
二值仓位策略 —— 含离场后强制冷静期的最佳 PnL

Binary-State Strategy — Best PnL With Post-Exit Cooldown

中等免费版Python / C++ / Rust
未尝试
coding-build-largest-pnl-concat可练习
拼接最大 P&L 信号强度串

Build Largest P&L Signal-Strength String

中等免费版Python / C++ / Rust
未尝试
coding-canonical-symbol-group-ids可练习
预聚合分桶标签:多场所同标的的规范化分组编号

Pre-Aggregation Bucket Labels: Canonical-Form Group IDs for Multi-Venue Symbols

中等免费版Python / C++ / Rust
未尝试
coding-closer-stronger-bid-distance-bidirectional可练习
双向更强买价的最近距离:取前向 / 后向严格更高 print 中较近者

Closer-Stronger Bid Distance (Bidirectional): Min of Prev / Next Strictly-Higher Bid

中等免费版Python / C++ / Rust
未尝试
coding-compact-tick-buffer订阅锁定
把环形 tick 缓冲压缩成等长时间切片

Compact a Ring-Buffer of Ticks into Evenly-Bucketed Time Slices

中等面试准备Python / C++ / Rust
未尝试
coding-consolidated-best-bid-k-feeds可练习
跨 K 路场所报价流的最优买价合并流

Consolidated Best-Bid Stream Across K Venue Quote Feeds

中等免费版Python / C++ / Rust
未尝试
coding-cross-buy-sell-tape-events可练习
买价跨越邻近卖价的跨磁带路由质量告警计数

Cross-Tape Buy-Above-Sell Routing-Quality Alert Count

中等免费版Python / C++ / Rust
未尝试
coding-cross-feed-cum-count-lead-exchanges可练习
跨源行情累计计数领先权交换次数

Cross-Feed Cumulative-Count Lead Exchanges

中等免费版Python / C++ / Rust
未尝试
coding-cross-feed-max-min-paired-lag可练习
跨源行情最差最近匹配配对滞后

Worst Cross-Feed Closest-Match Paired Lag

中等免费版Python / C++ / Rust
未尝试
coding-cross-feed-tick-match-count可练习
跨源行情心跳容差匹配计数

Cross-Feed Tick Match Count Within Tolerance Window

中等免费版Python / C++ / Rust
未尝试
coding-cross-feed-unmatched-ticks-each-side可练习
跨源行情两侧各自未匹配心跳计数

Cross-Feed Unmatched Tick Counts Per Side Within Tolerance

中等免费版Python / C++ / Rust
未尝试
coding-dedup-tick-stream订阅锁定
按 (ts, exchange-seq) 去重 tick 流:以最晚到达的 ingest_ts 为准

Deduplicate a Replayed Tick Stream by (ts, exchange-seq), Latest-Ingest Wins

中等面试准备Python / C++ / Rust
未尝试
coding-distinct-symbols-with-open-orders可练习
持仓监控面板:当前在场的不同标的数量

Open-Order Dashboard Tile: Distinct Symbols Currently In Play

中等免费版Python / C++ / Rust
未尝试
coding-downsample-to-bars订阅锁定
把逐笔流降采样为 OHLCV K 线(右闭约定)

Downsample a Tick Stream into OHLCV Bars (Right-Closed)

中等面试准备Python / C++ / Rust
未尝试
coding-fix-message-checksum-verify可练习
FIX 风格尾字段校验和:管道分隔消息逐条三态判定

FIX-Style Trailing Checksum Verify: Trinary Label Per Pipe-Delimited Message

中等免费版Python / C++ / Rust
未尝试
coding-fix-tag-extract可练习
FIX 风格 tag 取值:在管道分隔消息中取数字 tag 的首个值

FIX-Style Tag Extract: First Value for a Numeric Tag in a Pipe-Delimited Message

中等免费版Python / C++ / Rust
未尝试
coding-forward-fill-missing-minutes订阅锁定
把交易日内缺失的分钟用前一笔向前填充

Forward-Fill Missing Minutes Within a Trading Session

中等面试准备Python / C++ / Rust
未尝试
coding-gcd-tick-sizes可练习
通用最小价位单元:跨场所 tick size 的最大公约数

Universal Tick Unit: GCD of Per-Venue Tick Sizes

中等免费版Python / C++ / Rust
未尝试
coding-greedy-min-cost-fill可练习
走簿打穿:贪心最小成本撮合

Walking the Book: Greedy Minimum-Cost Fill

中等免费版Python / C++ / Rust
未尝试
coding-iceberg-replenish-fills订阅锁定
Iceberg Order Book — Replenishment & Fills

Iceberg Order Book — Replenishment & Fills

中等面试准备Python / C++ / Rust
未尝试
coding-impact-attribution-by-venue订阅锁定
Post-Trade Impact Attribution Across Venues with a Cross-Venue Interaction

Post-Trade Impact Attribution Across Venues with a Cross-Venue Interaction

中等面试准备Python / C++ / Rust
未尝试
coding-incremental-largest-component-size可练习
增量最大聚簇规模:因子对边事件流上的流式并查集

Incremental Largest Cluster Size: Streaming Union-Find on a Factor-Pair Edge Tape

中等免费版Python / C++ / Rust
未尝试
coding-insert-and-merge-orderbook-levels可练习
插入并合并订单簿价格档位区间

Insert and Merge Order-Book Price-Level Intervals

中等免费版Python / C++ / Rust
未尝试
coding-inverse-percentile-rank-by-pnl可练习
日 PnL 在历史分布中的反向百分位排名

Inverse Percentile Rank of Daily PnL Against Reference Distribution

中等免费版Python / C++ / Rust
未尝试
coding-largest-volume-rectangle-histogram可练习
直方图中的最大体积矩形

Largest Volume Rectangle in a Histogram

中等免费版Python / C++ / Rust
未尝试
coding-limit-order-fill-simulation订阅锁定
基于高低价 bar 的限价单成交模拟

Limit-Order Fill Simulation against High-Low Bars

中等面试准备Python / C++ / Rust
未尝试
coding-linear-impact-cost-estimate订阅锁定
Linear Market-Impact Cost of a Child-Order Schedule

Linear Market-Impact Cost of a Child-Order Schedule

中等面试准备Python / C++ / Rust
未尝试
coding-longest-consecutive-sequence-hash可练习
最长连续整数序列(哈希集合)

Longest Consecutive Sequence (Hash Set)

中等免费版Python / C++ / Rust
未尝试
coding-max-nonoverlap-windows-with-switch-gap可练习
单会话子单调度:FIX 重配间隔下的最大不重叠窗口

Single-Session Child-Order Scheduling with FIX Reconfigure Gap

中等免费版Python / C++ / Rust
未尝试
coding-max-reward-trades-min-gap可练习
在合规冷却期约束下的最大累计收益(带时间戳的候选交易)

Maximum Total Reward From Timestamped Trade Candidates Under A Compliance Hold-Period Gap

中等免费版Python / C++ / Rust
未尝试
coding-max-throughput-child-orders-with-windows可练习
单会话最大子单吞吐:每单独立时长与 FIX 重配间隔

Maximum Child-Order Throughput With Per-Order Durations And A FIX-Session Gap

中等免费版Python / C++ / Rust
未尝试
coding-merge-bar-shards-by-date订阅锁定
合并按日分片的 K 线数据为有序时间序列

Merge Per-Day Bar Shards into a Sorted Timeseries

中等面试准备Python / C++ / Rust
未尝试
coding-merge-k-quote-streams-heap可练习
带溯源的 K 路报价流合并

Merge K Quote Streams with Lineage

中等免费版Python / C++ / Rust
未尝试
coding-merge-k-venue-trade-tapes可练习
将 K 路场所成交磁带合并为单一时间序流

Merge K Per-Venue Trade Tapes Into One Chronological Stream

中等免费版Python / C++ / Rust
未尝试
coding-merge-news-feed-streams可练习
多源新闻 Feed 取最新 N 条

Top-N Recent Items From Per-Source News Feeds

中等免费版Python / C++ / Rust
未尝试
coding-min-cancels-throttle-window可练习
节流窗口合规回放:最少需撤单次数

Throttle-Window Compliance Replay: Minimum Order Cancels

中等免费版Python / C++ / Rust
未尝试
coding-min-flatten-resets-keep-position-in-band可练习
仓位区间治理:保持净仓在 [-L, +L] 内所需的最少日终归零次数

Position-Band Governance: Minimum Flatten-Resets to Stay Inside [-L, +L]

中等免费版Python / C++ / Rust
未尝试
coding-min-replenish-keep-inventory-positive可练习
对冲存量补货:保持非负所需的最少补货次数

Hedge-Inventory Replenishment: Minimum Top-Ups to Stay Non-Negative

中等免费版Python / C++ / Rust
未尝试
coding-min-routers-with-setup-delay可练习
含 FIX 会话重配延迟的最小路由器数

Minimum Routers with FIX-Session Setup Delay

中等免费版Python / C++ / Rust
未尝试
coding-most-frequent-trade-fingerprint可练习
成交带异常检测:找出重复次数最多的成交指纹

Tape-Anomaly Detector: Most-Repeated Trade Fingerprint

中等免费版Python / C++ / Rust
未尝试
coding-net-position-from-trade-events可练习
由原始成交流水计算日终净头寸

End-of-Day Net Positions from a Raw Trade Tape

中等免费版Python / C++ / Rust
未尝试
coding-next-all-time-high-index可练习
距离下一次新高的索引:首个严格高于「累积最高水位」的未来 tick

Time-to-New-All-Time-High: First Future Index Strictly Above the Running Peak

中等免费版Python / C++ / Rust
未尝试
coding-online-cumulative-bollinger-bands可练习
在线累计 Bollinger 带:Welford 递推的带对序列

Online Cumulative Bollinger Bands: Welford-Recurrence Band-Pair Stream

中等免费版Python / C++ / Rust
未尝试
coding-online-zscore-outlier-flagger可练习
在线 Z 分数离群标记:用 Welford 累计历史检测 tick 流异常

Online Z-Score Outlier Flagger: Welford-Cumulative Anomaly Detection on a Tick Stream

中等免费版Python / C++ / Rust
未尝试
coding-orphan-cancel-count可练习
路由可靠性检查:统计孤儿撤单数量

Router Reliability Check: Count Orphan Cancellations

中等免费版Python / C++ / Rust
未尝试
coding-pancake-sort-flip-sequence可练习
煎饼排序:翻转序列

Pancake Sort: Flip Sequence

中等免费版Python / C++ / Rust
未尝试
coding-percentile-pnl-linear-interp可练习
成交 PnL 的线性插值百分位

Linear-Interpolation Percentile of Trade PnL

中等免费版Python / C++ / Rust
未尝试
coding-pov-rate-schedule订阅锁定
带上下限的反应式 POV 执行调度

Reactive POV Schedule with Min/Max Catch-Up Bounds

中等面试准备Python / C++ / Rust
未尝试
coding-pre-trade-impact-budget-check订阅锁定
Pre-Trade Multi-Leg Impact Budget Check (Square-Root Model)

Pre-Trade Multi-Leg Impact Budget Check (Square-Root Model)

中等面试准备Python / C++ / Rust
未尝试
coding-prev-stronger-bid-distance可练习
上一次更强买价的距离:到最近一次严格更高买价 print 的间隔

Prev-Stronger Bid Distance: Time Since the Last Strictly-Higher Bid Print

中等免费版Python / C++ / Rust
未尝试
coding-price-time-priority-queue-replay订阅锁定
Price-Time Priority Queue — Order Book Replay

Price-Time Priority Queue — Order Book Replay

中等面试准备Python / C++ / Rust
未尝试
coding-pro-rata-allocation-fills订阅锁定
Pro-Rata Allocation — Single-Level Fill Distribution

Pro-Rata Allocation — Single-Level Fill Distribution

中等面试准备Python / C++ / Rust
未尝试
coding-quartile-pack-and-iqr-from-returns可练习
期间收益的四分位包与 IQR

Quartile Pack with IQR from Per-Period Returns

中等免费版Python / C++ / Rust
未尝试
coding-queue-position-poisson-closed-form订阅锁定
队列位置成交概率:Poisson 到达下的闭式解

Queue Position Fill Probability — Closed-Form Under Poisson Arrivals

中等面试准备Python / C++ / Rust
未尝试
coding-rank-inversion-count可练习
排名失配对数:期望榜单与实测榜单的两两逆序对计数

Rank-Disagreement Count: Pairwise Inversions Between Expected and Realized Strategy Rankings

中等免费版Python / C++ / Rust
未尝试
coding-realign-k-tapes-to-global-clock可练习
用各自的时钟偏移把 K 路成交磁带对齐到全局时钟

Realign K Trade Tapes to a Global Clock with Per-Tape Offsets

中等免费版Python / C++ / Rust
未尝试
coding-removing-k-digits-monotonic可练习
删除 K 位数字 — 最小结果

Removing K Digits — Smallest Result

中等免费版Python / C++ / Rust
未尝试
coding-rolling-quote-stale-flags可练习
报价更新时间流上的"陈旧期后首次更新"标记

First-Update-After-Stale-Period Flags on a Quote-Update Timestamp Stream

中等免费版Python / C++ / Rust
未尝试
coding-rolling-trade-rate-window可练习
半开回看滑窗下的实时成交率计数

Live Trade-Rate Count over a Half-Open Lookback Sliding Window

中等免费版Python / C++ / Rust
未尝试
coding-rolling-window-range-spread可练习
双单调队列滑窗下的分钟级行情极差监控

Minute-Bar Range Monitor via Dual-Deque Sliding Max-Minus-Min

中等免费版Python / C++ / Rust
未尝试
coding-running-distinct-counterparty-count可练习
对手方多样性诊断:滚动累计不同对手方数量

Counterparty Diversity Diagnostic: Running Distinct Counterparty Count

中等免费版Python / C++ / Rust
未尝试
coding-running-unbroken-bid-stack-sum可练习
仍未被击穿的买价栈累加和:当下尚未被覆盖的支撑层合计

Running Unbroken-Bid Stack Sum: Cumulative Support of Still-Standing Prior Bids

中等免费版Python / C++ / Rust
未尝试
coding-shortest-window-k-spikes可练习
收益流中包含 K 个幅度跳点的最短窗口

Shortest Window Containing K Magnitude Spikes in a Return Stream

中等免费版Python / C++ / Rust
未尝试
coding-size-weighted-median-fillprice可练习
成交量加权中位数成交价

Size-Weighted Median Fill Price

中等免费版Python / C++ / Rust
未尝试
coding-sliding-window-max-quote可练习
报价滑动窗口最大值

Sliding Window Max of Quotes

中等免费版Python / C++ / Rust
未尝试
coding-sor-displayed-size-greedy订阅锁定
Multi-Level SOR with Stale-Quote Re-Routing — Event Replay

Multi-Level SOR with Stale-Quote Re-Routing — Event Replay

中等面试准备Python / C++ / Rust
未尝试
coding-sor-min-venue-count-constraint订阅锁定
Min-Venue-Count Smart Order Routing with Fee-Tier Crossing Penalty

Min-Venue-Count Smart Order Routing with Fee-Tier Crossing Penalty

中等面试准备Python / C++ / Rust
未尝试
coding-sor-replenishing-book-stream订阅锁定
SOR Across Replenishing Iceberg Venues — Event Replay

SOR Across Replenishing Iceberg Venues — Event Replay

中等面试准备Python / C++ / Rust
未尝试
coding-sor-static-fee-aware订阅锁定
基于费用感知的静态多场所智能路由

Fee-Aware Static Smart-Order Routing Across Venues

中等面试准备Python / C++ / Rust
未尝试
coding-stock-span-monotonic-stack可练习
在线股价跨度

Online Stock Span

中等免费版Python / C++ / Rust
未尝试
coding-strategy-pnl-bookkeeping可练习
按策略维度的盯市 P&L 簿记

Per-Strategy P&L Bookkeeping with Mark-to-Market

中等免费版Python / C++ / Rust
未尝试
coding-strategy-rank-by-sharpe-then-id可练习
策略排行榜:按 Sharpe 取前 K,同分按 strategy_id 字典序

Strategy Leaderboard: Top-K by Sharpe with Lexicographic Tie-Break

中等免费版Python / C++ / Rust
未尝试
coding-stream-running-vwap-merged-tapes可练习
跨 K 路场所成交磁带的 running VWAP 流式计算

Running VWAP Across Merged K-Venue Trade Tapes

中等免费版Python / C++ / Rust
未尝试
coding-streaming-median-time-window可练习
固定时间窗口内的流式中位数

Streaming Median Over a Fixed Time Window

中等免费版Python / C++ / Rust
未尝试
coding-streaming-running-mode可练习
流式运行众数:基于懒删除堆维护最高频值

Streaming Running Mode — Most-Frequent Value with Lazy-Deletion Heap

中等免费版Python / C++ / Rust
未尝试
coding-streaming-top-k-by-notional可练习
流式聚合:成交金额前 K 名股票

Streaming Top-K Tickers by Notional

中等免费版Python / C++ / Rust
未尝试
coding-subarray-min-cost-fill可练习
订单簿全档位区间的均匀打穿股数总量

Total Uniform-Fill Shares across Every Order-Book Level Range

中等免费版Python / C++ / Rust
未尝试
coding-sum-subarray-mins-pnl可练习
P&L 子数组最小值之和

Sum of Subarray Minimum P&Ls

中等免费版Python / C++ / Rust
未尝试
coding-three-stream-synchronized-triple-count可练习
三流容差同步三元组计数

Three-Stream Synchronized Triple Count Within Tolerance

中等免费版Python / C++ / Rust
未尝试
coding-tick-buffer-binary-search-by-ts订阅锁定
Tick 缓冲:按时间戳的二分查找与区间扫描

Tick Buffer — Binary-Search Lookup and Range Scan by Timestamp

中等面试准备Python / C++ / Rust
未尝试
coding-topk-slippage-stable-tiebreak可练习
TCA 最差 K 笔成交:滑点 Top-K 与到达序号稳定打破并列

TCA Worst-K Fills: Top-K Slippage with Stable Arrival-Seq Tiebreak

中等免费版Python / C++ / Rust
未尝试
coding-trades-to-ohlcv-bars可练习
把成交磁带聚合为分桶 OHLCV K 线

Aggregate a Trade Tape Into Per-Bucket OHLCV Bars

中等免费版Python / C++ / Rust
未尝试
coding-trailing-high-watermark-span可练习
跟踪最高水位 span:每个 tick 的连续不超过当前价的回看长度

Trailing High-Watermark Span: Per-Tick Consolidation Length on a Synthetic Tape

中等免费版Python / C++ / Rust
未尝试
coding-trapping-volume-between-quotes可练习
局部高点报价之间的最大囤积体积

Trapping Volume Between Local-Max Quotes

中等免费版Python / C++ / Rust
未尝试
coding-twap-equal-slice-schedule订阅锁定
TWAP 等量切片调度与前置余量分配

TWAP Equal-Slice Schedule with Front-Loaded Residue

中等面试准备Python / C++ / Rust
未尝试
coding-vwap-tracking-error-pnl订阅锁定
VWAP Tracking-Error P&L

VWAP Tracking-Error P&L

中等面试准备Python / C++ / Rust
未尝试
coding-vwap-volume-curve-schedule订阅锁定
沿成交量曲线的 VWAP 调度与参与率上限

VWAP Schedule Along a Volume Curve with Participation Cap

中等面试准备Python / C++ / Rust
未尝试
coding-window-argmin-offset可练习
滑窗最低价的窗内偏移:每段定长窗口内最低价相对左缘的位置

Sliding-Window Argmin Offset: Per-Window Position of the Minimum Price Relative to the Window Left Edge

中等免费版Python / C++ / Rust