面试场景
高频考察问题建模、边界条件与口头表达的清晰度。
常见误区
只背模板不解释为什么,容易在追问里失分。
练习策略
每轮练 3-5 题,固定复盘复杂度和可替代解法。
推荐练习顺序
#题目难度分类
382
链表随机节点
Select a random node from a singly linked list ensuring uniform probability using efficient pointer techniques and reser…
中等
链表
398随机数索引
Random Pick Index involves selecting a random index of a target number in an array with possible duplicates.
中等
哈希表
497非重叠矩形中的随机点
Design an algorithm to pick random points within non-overlapping rectangles using binary search and reservoir sampling.
中等
数组
519随机翻转矩阵
Design an optimized algorithm to randomly flip an index in a matrix, using hash tables and math for efficient random sel…
中等
哈希表