CODING CHALLENGES

代码题库

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

继续刷题

题目列表

显示 84 / 646 道可提交题。 当前筛选:难度:简单,权限:免费

提交状态:未尝试未正确已正确
未尝试
coding-add-binary-strings可练习
二进制字符串相加

Add Two Binary Strings

简单免费版Python / C++ / Rust
未尝试
coding-array-product-except-self可练习
除自身以外数组的乘积

Array Product Except Self

简单免费版Python / C++ / Rust
未尝试
coding-best-single-trade-in-a-day可练习
日内最优单次交易

Best Single Trade in a Day

简单免费版Python / C++ / Rust
未尝试
coding-binary-search-target-leftmost-bisect可练习
二分查找:目标值的最左下标 (bisect_left)

Leftmost Index via Binary Search (bisect_left)

简单免费版Python / C++ / Rust
未尝试
coding-binary-tree-backward-induction可练习
通用二叉树上的逆向归纳

Backward Induction on a Generic Binary Tree

简单免费版Python / C++ / Rust
未尝试
coding-binary-tree-invert-mirror可练习
翻转二叉树(镜像)

Invert Binary Tree (Mirror)

简单免费版Python / C++ / Rust
未尝试
coding-binary-tree-max-depth-recursive可练习
二叉树的最大深度(递归)

Maximum Depth of a Binary Tree (Recursive)

简单免费版Python / C++ / Rust
未尝试
coding-binary-tree-symmetric-check可练习
对称二叉树判定

Symmetric Binary Tree Check

简单免费版Python / C++ / Rust
未尝试
coding-bitmask-position-flags可练习
持仓属性位掩码查询

Per-Position Flag Bitmask Queries

简单免费版Python / C++ / Rust
未尝试
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-canonical-symbol-form可练习
代码符号规整 — 跨场所去重分组

Canonical Ticker-Symbol Form — Cross-Venue Dedup

简单免费版Python / C++ / Rust
未尝试
coding-count-in-band-k-windows可练习
全部报价位于容差带内的 K 期窗口计数

Count K-Tick Windows With Every Quote Inside the Tolerance Band

简单免费版Python / C++ / Rust
未尝试
coding-count-positive-flow-k-windows可练习
严格净流入的 K 期窗口计数

Count of Strictly-Positive Net-Inflow K-Period Windows

简单免费版Python / C++ / Rust
未尝试
coding-counterparty-max-count-differential可练习
对手方活跃度漂移:跨两段成交流水的最大计数差异

Counterparty Activity Shift: Largest Trade-Count Differential Across Two Sessions

简单免费版Python / C++ / Rust
未尝试
coding-counterparty-notional-aggregator可练习
对手方毛敞口聚合器:按规模排序的汇总表

Counterparty Gross-Notional Aggregator: Magnitude-Sorted Roll-Up

简单免费版Python / C++ / Rust
未尝试
coding-cumulative-volume-snapshot可练习
累计成交量快照查询

Cumulative Volume Snapshot

简单免费版Python / C++ / Rust
未尝试
coding-daily-pnl-streak-stack可练习
距下一个更高 P&L 的天数

Days Until a Better PnL

简单免费版Python / C++ / Rust
未尝试
coding-day-over-day-counterparty-symmetric-diff可练习
对手方轮动指示器:日间对称差大小序列

Counterparty Rotation Indicator: Day-Over-Day Symmetric-Difference Series

简单免费版Python / C++ / Rust
未尝试
coding-decision-tree-evaluator可练习
Recursive Binary Decision-Tree Evaluator

Recursive Binary Decision-Tree Evaluator

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

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

简单免费版Python / C++ / Rust
未尝试
coding-fill-attribution-by-parent-id可练习
按父单 ID 归集成交:子单回填到父单

Fill Attribution by Parent Order ID

简单免费版Python / C++ / Rust
未尝试
coding-find-pivot-index可练习
P&L 序列的枢轴下标

Find the Pivot Index of a P&L Stream

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

Find Third Largest Distinct

简单免费版Python / C++ / Rust
未尝试
coding-first-day-cumulative-pnl-crosses-threshold可练习
累计 PnL 首次突破阈值的交易日

First Day Cumulative PnL Crosses Threshold

简单免费版Python / C++ / Rust
未尝试
coding-first-order-id-with-freq-k可练习
成交审计频次探针:定位首个生命周期 FIX 事件数恰为 k 的 order ID

Fills-Audit Frequency Probe: First Order-ID Whose Lifecycle Hits Exactly k FIX Events

简单免费版Python / C++ / Rust
未尝试
coding-first-unique-character可练习
第一个唯一字符

First Unique Character

简单免费版Python / C++ / Rust
未尝试简单免费版Python / C++ / Rust
未尝试
coding-gcd-of-share-lots可练习
份额最大公约数 — 整手再划分

GCD of Share Lots — Round-Lot Reconciliation

简单免费版Python / C++ / Rust
未尝试
coding-graph-count-connected-components-bfs可练习
Count Connected Components in an Undirected Graph

Count Connected Components in an Undirected Graph

简单免费版Python / C++ / Rust
未尝试
coding-graph-cycle-detect-undirected可练习
判断无向图是否存在环

Detect a Cycle in an Undirected Graph

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

Greedy Coin Change on a Canonical Denomination Set

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

Minimum Platforms for a Railway Schedule

简单免费版Python / C++ / Rust
未尝试
coding-grid-min-path-sum可练习
网格最小代价路径

Minimum Cost Path Through a Grid

简单免费版Python / C++ / Rust
未尝试
coding-grid-pnl-path-max可练习
网格盈亏的最大累积路径

Maximum P&L Path Through a Grid

简单免费版Python / C++ / Rust
未尝试
coding-jump-game-can-reach可练习
跳跃游戏 — 能否到达终点

Jump Game — Can You Reach the Last Index

简单免费版Python / C++ / Rust
未尝试
coding-k-day-rolling-mean-filter可练习
K 日滚动均价滤波

K-Day Rolling Mean Filter

简单免费版Python / C++ / Rust
未尝试
coding-koko-eating-bananas可练习
最小吃香蕉速度(在答案上二分)

Minimum Eating Speed (Binary Search on the Answer)

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

Largest Divisible Pair (Sort + Scan)

简单免费版Python / C++ / Rust
未尝试
coding-longest-palindromic-substring可练习
最长回文子串

Longest Palindromic Substring

简单免费版Python / C++ / Rust
未尝试
coding-longest-substring-no-repeat可练习
无重复字符的最长子串

Longest Substring Without Repeating Characters

简单免费版Python / C++ / Rust
未尝试
coding-match-bid-ask-snapshots可练习
撮合买卖盘快照时间戳

Match Bid and Ask Snapshots

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

Max Non-Overlapping Trade Windows

简单免费版Python / C++ / Rust
未尝试
coding-max-sum-fixed-window-array可练习
定长滑动窗口最大和

Max Sum of Fixed-Size Window

简单免费版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-cash-buffer-to-survive可练习
最小生存现金缓冲

Min Cash Buffer to Survive

简单免费版Python / C++ / Rust
未尝试
coding-min-flips-monotone-pnl可练习
最少翻转使涨跌序列单调

Minimum Flips for Monotone Up-Day Pattern

简单免费版Python / C++ / Rust
未尝试
coding-min-rooms-for-streaming-jobs可练习
并发流式执行机的最小数量

Minimum Concurrent Streaming Jobs for Execution Windows

简单免费版Python / C++ / Rust
未尝试
coding-min-stack-with-getmin可练习
支持 O(1) 取最小值的最小栈

Min-Stack with O(1) get_min

简单免费版Python / C++ / Rust
未尝试
coding-min-tickers-for-coverage可练习
Minimum Tickers for Liquidity Coverage

Minimum Tickers for Liquidity Coverage

简单免费版Python / C++ / Rust
未尝试
coding-most-frequent-consecutive-event-pair可练习
订单事件足迹:找出最频繁的连续事件二元组

Order-Event Footprint: Most-Frequent Consecutive Event-Pair

简单免费版Python / C++ / Rust
未尝试
coding-next-greater-quote-time可练习
下一次更高报价的时间戳

Next Greater Quote Timestamp

简单免费版Python / C++ / Rust
未尝试
coding-next-smaller-element-mono-stack可练习
下一个更小元素的下标

Next Smaller Element Index

简单免费版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-online-autocorrelation-lag1可练习
时间序列的 lag-1 样本自相关系数

Lag-1 Sample Autocorrelation of a Time Series

简单免费版Python / C++ / Rust
未尝试
coding-online-mean-mad可练习
滚动均值与平均绝对偏差

Running Mean and Mean Absolute Deviation

简单免费版Python / C++ / Rust
未尝试
coding-pascals-triangle-row可练习
杨辉三角第 k 行的 O(k) 空间解

Pascal's Triangle Row in O(k) Space

简单免费版Python / C++ / Rust
未尝试
coding-peak-inventory-day-after-batch-trades可练习
批量区间增量交易后的峰值库存日

Peak Inventory Day After Batched Range-Update Trades

简单免费版Python / C++ / Rust
未尝试
coding-portfolio-tree-aggregate-pnl可练习
沿组合层级树向上聚合 P&L

Aggregate P&L Up a Portfolio Hierarchy Tree

简单免费版Python / C++ / Rust
未尝试
coding-power-of-two-bit-check可练习
2 的幂位运算判定

Power-of-Two Bit Check

简单免费版Python / C++ / Rust
未尝试
coding-prime-check-trial-division可练习
试除法判素数

Primality Test by Trial Division

简单免费版Python / C++ / Rust
未尝试
coding-range-sum-2d-prefix可练习
二维区间和查询(前缀和表)

2D Range Sum via Prefix Table

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

Rank Records by Multi-Key Tie-Break Rule

简单免费版Python / C++ / Rust
未尝试
coding-recursive-rebate-tier-walk可练习
Recursive Walk Down a Hierarchical Rebate-Tier Tree

Recursive Walk Down a Hierarchical Rebate-Tier Tree

简单免费版Python / C++ / Rust
未尝试
coding-reverse-string可练习
反转字符串

Reverse String

简单免费版Python / C++ / Rust
未尝试
coding-roman-to-integer-conversion可练习
罗马数字转整数

Roman Numeral to Integer

简单免费版Python / C++ / Rust
未尝试
coding-rotting-oranges-bfs可练习
烂橘子蔓延 — 多源 BFS

Rotting Oranges — Multi-Source BFS

简单免费版Python / C++ / Rust
未尝试
coding-running-cumulative-sum-stream可练习
流式累计求和

Running Cumulative Sum over a Stream

简单免费版Python / C++ / Rust
未尝试
coding-running-min-max-deque可练习
数据流的累积最小最大值

Running Min and Max of a Stream

简单免费版Python / C++ / Rust
未尝试
coding-shortest-fee-path-routing-graph可练习
路由图上的最短跳数路径

Shortest Hop Path on a Routing Graph

简单免费版Python / C++ / Rust
未尝试
coding-stream-distinct-count-elements可练习
流式不同元素的运行计数

Stream Running Distinct Count

简单免费版Python / C++ / Rust
未尝试
coding-stream-kth-largest-pnl可练习
流式 K 大盈亏

Streaming K-th Largest P&L

简单免费版Python / C++ / Rust
未尝试
coding-string-reverse-sentence-words可练习
反转句子中的单词

Reverse Words in a Sentence

简单免费版Python / C++ / Rust
未尝试
coding-string-valid-palindrome-check可练习
有效回文判断(仅字母数字、忽略大小写)

Valid Palindrome (Alphanumeric, Case-Insensitive)

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

Top K Liquid Tickers

简单免费版Python / C++ / Rust
未尝试
coding-tree-search-bst-target可练习
在二叉搜索树中查找目标值

Search a Binary Search Tree for a Target

简单免费版Python / C++ / Rust
未尝试
coding-tribonacci-iterative可练习
迭代法求 Tribonacci 数

Iterative Tribonacci Number

简单免费版Python / C++ / Rust
未尝试简单免费版Python / C++ / Rust
未尝试
coding-unique-paths-with-obstacles可练习
带障碍的不同路径数

Unique Paths with Obstacles

简单免费版Python / C++ / Rust
未尝试
coding-unique-tickers-in-session可练习
盘中出现的唯一标的集合

Unique Tickers In Session

简单免费版Python / C++ / Rust
未尝试
coding-valid-anagram-character-counts可练习
有效的字母异位词(字符计数)

Valid Anagram (Character Counts)

简单免费版Python / C++ / Rust
未尝试
coding-validate-bst-recursive可练习
校验二叉搜索树(递归区间)

Validate Binary Search Tree (Recursive Bounds)

简单免费版Python / C++ / Rust