CODING CHALLENGES

代码题库

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

继续刷题

题目列表

显示 53 / 646 道可提交题。 当前筛选:标签:Sorting,权限:免费

提交状态:未尝试未正确已正确
未尝试
coding-bucket-histogram-trade-sizes可练习
用右闭分桶把交易笔数归入规模档位

Trade-Size Tier Histogram via Right-Inclusive Edges

简单免费版Python / C++ / Rust
未尝试
coding-bucket-sort-pnl-quantiles可练习
桶排序构建盈亏直方图

Bucket-Sort P&L Histogram

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

Build Largest P&L Signal-Strength String

中等免费版Python / C++ / Rust
未尝试
coding-closest-trade-pair-notional可练习
最接近目标名义本金的成交配对

Closest Trade Pair to Target Notional

中等免费版Python / C++ / Rust
未尝试
coding-dense-rank-trade-sizes可练习
给当日成交按所属买卖方向做 dense rank 标注

Per-Side Dense-Rank Annotation for the Day's Blotter

简单免费版Python / C++ / Rust
未尝试
coding-empirical-marginal-cdf-inverse-mapping可练习
经验逆 CDF 边际映射(Copula 流水线第二步)

Empirical Inverse-CDF Marginal Mapping (Copula Pipeline, Step Two)

困难免费版Python / C++ / Rust
未尝试
coding-ewma-weighted-historical-var可练习
EWMA 加权历史 VaR

EWMA-Weighted Historical VaR

中等免费版Python / C++ / Rust
未尝试
coding-filtered-historical-simulation-var可练习
过滤历史模拟 VaR

Filtered Historical Simulation VaR

中等免费版Python / C++ / Rust
未尝试
coding-find-third-largest-distinct可练习
查找第三大的不同元素

Find Third Largest Distinct

简单免费版Python / C++ / Rust
未尝试
coding-greedy-coin-change-canonical-set可练习
规范币集上的贪心找零

Greedy Coin Change on a Canonical Denomination Set

简单免费版Python / C++ / Rust
未尝试
coding-greedy-fee-tier-coverage可练习
用最少手续费档位覆盖目标交易量区间

Minimum Fee-Tier Selection to Cover a Target Volume Range

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

Walking the Book: Greedy Minimum-Cost Fill

中等免费版Python / C++ / Rust
未尝试
coding-greedy-min-platforms-railway可练习
铁路时刻表所需的最少站台数

Minimum Platforms for a Railway Schedule

简单免费版Python / C++ / Rust
未尝试
coding-historical-es-multi-alpha可练习
多置信度历史 ES 一次性计算

Historical Expected Shortfall at Multiple Confidence Levels

中等免费版Python / C++ / Rust
未尝试
coding-historical-expected-shortfall可练习
历史期望损失

Historical Expected Shortfall

中等免费版Python / C++ / Rust
未尝试
coding-historical-var-multi-alpha可练习
多置信度历史 VaR 一次性计算

Historical VaR at Multiple Confidence Levels

中等免费版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-jump-game-can-reach可练习
跳跃游戏 — 能否到达终点

Jump Game — Can You Reach the Last Index

简单免费版Python / C++ / Rust
未尝试
coding-largest-divisible-pair-sort可练习
最大可整除对(排序 + 扫描)

Largest Divisible Pair (Sort + Scan)

简单免费版Python / C++ / Rust
未尝试
coding-max-non-overlap-trade-windows可练习
最多不重叠交易时间窗

Max Non-Overlapping Trade Windows

简单免费版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-throughput-child-orders-with-windows可练习
单会话最大子单吞吐:每单独立时长与 FIX 重配间隔

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

中等免费版Python / C++ / Rust
未尝试
coding-maximum-concurrent-trades可练习
最大同时在仓交易数

Maximum Concurrent Trades

中等免费版Python / C++ / Rust
未尝试
coding-mean-excess-over-threshold-grid可练习
阈值网格上的均值超额曲线

Mean-Excess Curve Across a Threshold Grid

中等免费版Python / C++ / Rust
未尝试
coding-merge-k-sorted-trade-streams可练习
合并 K 条交易所成交磁带

Merge K Sorted Trade Streams

中等免费版Python / C++ / Rust
未尝试
coding-merge-overlapping-quote-windows可练习
Merge Overlapping Quote-Validity Windows

Merge Overlapping Quote-Validity Windows

简单免费版Python / C++ / Rust
未尝试
coding-merge-two-sorted-lists-iterative可练习
合并两个有序列表 — 迭代双指针

Merge Two Sorted Lists — Iterative Two-Pointer

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

Throttle-Window Compliance Replay: Minimum Order Cancels

中等免费版Python / C++ / Rust
未尝试
coding-min-cuts-stable-spread-runs可练习
波动稳定段切分 —— 在跨度上限下覆盖收益序列的最少段数

Regime-Stability Segmentation — Fewest Bounded-Spread Runs Over A Return Stream

中等免费版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-rooms-for-streaming-jobs可练习
并发流式执行机的最小数量

Minimum Concurrent Streaming Jobs for Execution Windows

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

Minimum Routers with FIX-Session Setup Delay

中等免费版Python / C++ / Rust
未尝试
coding-non-overlap-rebalance-windows可练习
最少需移除的再平衡时间窗

Min Rebalance Windows To Remove

简单免费版Python / C++ / Rust
未尝试
coding-non-overlapping-intervals-greedy可练习
使区间互不相交的最少移除数

Min Intervals To Remove For Non-Overlap

简单免费版Python / C++ / Rust
未尝试
coding-notional-by-venue-ranked可练习
按场所聚合的成交名义额排行榜

Notional by Venue, Ranked

中等免费版Python / C++ / Rust
未尝试中等免费版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-position-fingerprint-grouping可练习
组合持仓指纹聚类

Position Fingerprint Grouping

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

Quartile Pack with IQR from Per-Period Returns

中等免费版Python / C++ / Rust
未尝试
coding-rank-by-multi-key-tiebreak可练习
按多键优先级与次序对记录排序

Rank Records by Multi-Key Tie-Break Rule

简单免费版Python / C++ / Rust
未尝试
coding-rank-inversion-count可练习
排名失配对数:期望榜单与实测榜单的两两逆序对计数

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

中等免费版Python / C++ / Rust
未尝试
coding-rank-strategies-by-sharpe可练习
按夏普比率排序策略(波动率作为次序)

Rank Strategies by Sharpe with Vol Tiebreak

中等免费版Python / C++ / Rust
未尝试
coding-regime-conditional-expected-shortfall可练习
分制度条件历史期望损失

Regime-Conditional Historical Expected Shortfall

中等免费版Python / C++ / Rust
未尝试
coding-regime-conditional-historical-var可练习
分制度条件历史 VaR

Regime-Conditional Historical VaR

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

Size-Weighted Median Fill Price

中等免费版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-stressed-es-worst-rolling-window可练习
压力 ES — 最差滚动窗口历史 ES

Stressed Expected Shortfall — Worst Rolling-Window Historical ES

中等免费版Python / C++ / Rust
未尝试
coding-stressed-var-worst-rolling-window可练习
压力 VaR — 最差滚动窗口历史 VaR

Stressed VaR — Worst Rolling-Window Historical VaR

中等免费版Python / C++ / Rust
未尝试
coding-top-k-liquid-tickers可练习
流动性 Top-K 标的榜单

Top K Liquid Tickers

简单免费版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-weighted-historical-var-custom-weights可练习
自定义权重历史 VaR

Weighted Historical VaR with Custom Weights

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