面试场景
高频考察问题建模、边界条件与口头表达的清晰度。
常见误区
只背模板不解释为什么,容易在追问里失分。
练习策略
每轮练 3-5 题,固定复盘复杂度和可替代解法。
推荐练习顺序
#题目难度分类
173
二叉搜索树迭代器
Implement an iterator for in-order traversal of a binary search tree (BST), maintaining traversal state with stack-based…
中等
栈
284窥视迭代器
Design an iterator with peek functionality, adding to the standard next and hasNext operations for efficient element acc…
中等
数组
341扁平化嵌套列表迭代器
Implement an iterator to flatten a nested list of integers, accounting for potential nesting levels.
中等
栈
900RLE 迭代器
Design an efficient iterator for a run-length encoded array, handling large counts and sequential access correctly every…
中等
数组
1286字母组合迭代器
Implement an iterator that generates all combinations of a given length using efficient backtracking with pruning.
中等
字符串