CODING CHALLENGES

代码题库

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

继续刷题

题目列表

显示 96 / 646 道可提交题。 当前筛选:标签:Sorting,语言:C++

提交状态:未尝试未正确已正确
未尝试
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-conditional-drawdown-at-risk订阅锁定
条件回撤风险

Conditional Drawdown at Risk

中等面试准备Python / C++ / Rust
未尝试
coding-cornish-fisher-var订阅锁定
Cornish-Fisher VaR

Cornish-Fisher VaR

中等面试准备Python / C++ / Rust
未尝试
coding-cross-sectional-rank-percentile订阅锁定
横截面 alpha 因子的排名分位数变换

Rank-to-Percentile Transform on a Cross-Section of Alpha Factors

中等面试准备Python / C++ / Rust
未尝试
coding-decile-spread-return订阅锁定
横截面十分位多空价差收益:跨期平均

Decile-Spread Forward Return Averaged Across Dates

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

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

简单免费版Python / C++ / Rust
未尝试
coding-divide-conquer-sum-tree订阅锁定
分治求和树(并行归约模拟)

Divide-and-Conquer Sum Tree (Parallel Reduction Simulation)

中等面试准备Python / C++ / Rust
未尝试
coding-empirical-copula-uniform-rank-transform订阅锁定
经验 Copula:按列均匀秩变换

Empirical Copula via Per-Column Uniform Rank Transform

困难面试准备Python / C++ / Rust
未尝试
coding-empirical-marginal-cdf-inverse-mapping可练习
经验逆 CDF 边际映射(Copula 流水线第二步)

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

困难免费版Python / C++ / Rust
未尝试
coding-empirical-mean-excess-function订阅锁定
用于 POT 阈值选择的经验均值超额函数

Empirical Mean Excess Function for POT Threshold Selection

困难面试准备Python / C++ / Rust
未尝试
coding-empirical-upper-tail-dependence订阅锁定
经验上尾相依系数:由二维联合样本估计

Empirical Upper-Tail-Dependence Coefficient from Bivariate Samples

困难面试准备Python / C++ / Rust
未尝试
coding-evt-block-maxima-gev-fit订阅锁定
用矩估计把分块极大值拟合到 Gumbel(GEV, ξ=0)子情形

Fit a Gumbel (GEV, ξ=0) to Block Maxima by Method of Moments

中等面试准备Python / C++ / Rust
未尝试
coding-evt-hill-estimator-tail-index订阅锁定
尾部指数的 Hill 估计

Hill Estimator for the Tail Index

中等面试准备Python / C++ / Rust
未尝试
coding-evt-pot-gpd-fit订阅锁定
阈值超额法 (POT) 下的 GPD 矩量法拟合

Peaks-Over-Threshold GPD Fit by Method of Moments

中等面试准备Python / C++ / Rust
未尝试
coding-ewma-weighted-historical-var可练习
EWMA 加权历史 VaR

EWMA-Weighted Historical VaR

中等免费版Python / C++ / Rust
未尝试
coding-expected-shortfall-historical订阅锁定
滚动历史 Expected Shortfall (CVaR)

Rolling Historical Expected Shortfall (CVaR)

中等面试准备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-fork-join-segment-stats订阅锁定
Fork-Join 分段统计(Welford 两段合并)

Fork-Join Segment Stats (Welford Pairwise Merge)

困难面试准备Python / C++ / Rust
未尝试
coding-gk-summary-streaming-quantile订阅锁定
Greenwald-Khanna Streaming Quantile Summary

Greenwald-Khanna Streaming Quantile Summary

中等面试准备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-hdr-histogram-recorded-values订阅锁定
HDR Histogram Recorded-Value Bucket Index and Quantile Estimate

HDR Histogram Recorded-Value Bucket Index and Quantile Estimate

困难面试准备Python / C++ / Rust
未尝试
coding-hill-estimator-tail-index订阅锁定
重尾损失分布尾指数的 Hill 估计

Hill Estimator for the Tail Index of a Heavy-Tailed Loss Distribution

困难面试准备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-historical-var-portfolio订阅锁定
组合历史 VaR

Historical VaR for a Long-Only Portfolio

中等面试准备Python / C++ / Rust
未尝试
coding-historical-var-var-only订阅锁定
滚动历史 VaR 序列

Rolling Historical VaR Track

中等面试准备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-mad-zscore-cross-section订阅锁定
基于中位数和 MAD 的稳健横截面 z-score

Robust Cross-Sectional Z-Score via Median and MAD

简单面试准备Python / C++ / Rust
未尝试
coding-mapreduce-groupby-count订阅锁定
MapReduce 分组计数(两阶段聚合)

MapReduce Group-By Count (Two-Phase Aggregation)

中等面试准备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-bar-shards-by-date订阅锁定
合并按日分片的 K 线数据为有序时间序列

Merge Per-Day Bar Shards into a Sorted Timeseries

中等面试准备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-monte-carlo-var-portfolio订阅锁定
蒙特卡洛 VaR(多资产组合)

Monte-Carlo VaR for a Multi-Asset Portfolio

中等面试准备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-parallel-pairwise-mean-merge订阅锁定
并行两两均值合并(Kahan 误差补偿)

Parallel Pairwise Mean Merge with Kahan Compensation

困难面试准备Python / C++ / Rust
未尝试
coding-pareto-tail-var-via-hill-estimator订阅锁定
基于 Hill 估计的 Pareto 尾部 VaR 外推

Pareto Tail VaR via Hill-Estimator Extrapolation

困难面试准备Python / C++ / Rust
未尝试
coding-percentile-from-bucketed-counts订阅锁定
Quantile Estimate from Pre-Bucketed Histogram Counts

Quantile Estimate from Pre-Bucketed Histogram Counts

中等面试准备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-quintile-bucket-by-factor订阅锁定
横截面因子的五分位(k 分位)分桶

Quintile (k-tile) Bucketing of a Cross-Sectional Factor

中等面试准备Python / C++ / Rust
未尝试
coding-rank-average-signal-combine订阅锁定
多因子信号的排名平均合成

Rank-Average Multi-Factor Signal Combination

中等面试准备Python / C++ / Rust
未尝试
coding-rank-bucket-decile订阅锁定
横截面排名分桶:按序数排名(首现破平)映射到十分位

Cross-Sectional Rank Bucketing into Deciles with Ordinal Tie-Breaks

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

Rank Records by Multi-Key Tie-Break Rule

简单免费版Python / C++ / Rust
未尝试
coding-rank-corr-spearman订阅锁定
两因子序列的 Spearman 等级相关:平均排名破平

Spearman Rank Correlation with Average-Rank Tie Breaking

中等面试准备Python / C++ / Rust
未尝试
coding-rank-correlation-spearman-kendall订阅锁定
Spearman 等级相关与 Kendall tau-b:copula 流水线上的双等级相关诊断

Spearman Rho and Kendall Tau-b: Dual Rank-Correlation Diagnostic for the Copula Pipeline

困难面试准备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-realized-vol-jump-test-bnsh订阅锁定
Realized-Volatility Jump Test (Barndorff-Nielsen and Shephard)

Realized-Volatility Jump Test (Barndorff-Nielsen and Shephard)

困难面试准备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-rolling-window-variance-ratio-test订阅锁定
Rolling-Window Variance Ratio Test (Lo-MacKinlay)

Rolling-Window Variance Ratio Test (Lo-MacKinlay)

困难面试准备Python / C++ / Rust
未尝试
coding-sector-neutralize-factor订阅锁定
横截面 alpha 因子的板块中性化

Sector-Neutralize an Alpha Factor Cross-Section

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

Size-Weighted Median Fill Price

中等免费版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-sor-with-fillrate-priors订阅锁定
Smart-Order Routing With Bayesian Fill-Rate Priors and UCB Exploration

Smart-Order Routing With Bayesian Fill-Rate Priors and UCB Exploration

困难面试准备Python / C++ / Rust
未尝试
coding-spectral-risk-measure订阅锁定
谱风险度量 (Acerbi 2002)

Spectral Risk Measure (Acerbi 2002)

困难面试准备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-survivorship-aware-universe订阅锁定
考虑幸存者偏差的当日可交易股票池

Survivorship-Aware Tradeable Universe on a Date

中等面试准备Python / C++ / Rust
未尝试
coding-tdigest-percentile-stream订阅锁定
T-Digest 流式分位数估计器(k_1 尺度函数)

T-Digest Streaming Percentile Estimator (k_1 Scale Function)

困难面试准备Python / C++ / Rust
未尝试
coding-top-k-liquid-tickers可练习
流动性 Top-K 标的榜单

Top K Liquid Tickers

简单免费版Python / C++ / Rust
未尝试
coding-topk-bottomk-portfolio订阅锁定
多最强 K / 空最弱 K 等权组合

Equal-Weight Long-Top-K / Short-Bottom-K Portfolio

中等面试准备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-tree-reduction-min-max订阅锁定
Tree Reduction with (min, max) Associative Combiner

Tree Reduction with (min, max) Associative Combiner

中等面试准备Python / C++ / Rust
未尝试
coding-weighted-historical-var-custom-weights可练习
自定义权重历史 VaR

Weighted Historical VaR with Custom Weights

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