面试场景
高频考察问题建模、边界条件与口头表达的清晰度。
常见误区
只背模板不解释为什么,容易在追问里失分。
练习策略
每轮练 3-5 题,固定复盘复杂度和可替代解法。
推荐练习顺序
合并 K 个升序链表
Merge k Sorted Lists requires efficiently combining multiple sorted linked lists into one using pointers and priority qu…
排序链表
Sort List requires sorting a singly linked list efficiently using pointer manipulation and merge sort for optimal perfor…
计算右侧小于当前元素的个数
Solve the Count of Smaller Numbers After Self problem using binary search and optimized algorithms.
区间和的个数
Count the number of subarray sums within a given inclusive range using optimized divide-and-conquer techniques efficient…
翻转对
Count the number of reverse pairs in a given integer array using efficient algorithms like binary search and merge sort.
排序数组
Sort an array using an optimal algorithm, focusing on time and space complexity considerations.
通过指令创建有序数组
The problem asks to compute the cost of inserting elements into a sorted array using a series of instructions.
统计数组中好三元组数目
Count Good Triplets in an Array requires tracking index orders across two permutations efficiently using binary search.
满足不等式的数对数目
Count pairs in two arrays satisfying a given inequality condition using binary search over the valid answer space.