-
Notifications
You must be signed in to change notification settings - Fork 0
Interview Preparation
Zishang Peng edited this page Oct 27, 2025
·
1 revision
面试高频题目和技巧总结。
Interview frequently asked questions and tips summary.
根据面试频率排序 Sorted by interview frequency:
| 题号 | 题目 | 频率 | 难度 | 公司 |
|---|---|---|---|---|
| 1 | Two Sum | ⭐⭐⭐⭐⭐ | Easy | Google, Amazon, Apple |
| 15 | 3Sum | ⭐⭐⭐⭐ | Medium | Facebook, Amazon |
| 26 | Remove Duplicates | ⭐⭐⭐ | Easy | Microsoft |
| 88 | Merge Sorted Array | ⭐⭐⭐⭐ | Easy | Facebook, Microsoft |
| 283 | Move Zeroes | ⭐⭐⭐ | Easy |
| 题号 | 题目 | 频率 | 难度 | 公司 |
|---|---|---|---|---|
| 2 | Add Two Numbers | ⭐⭐⭐⭐ | Medium | Amazon, Microsoft |
| 203 | Remove Elements | ⭐⭐⭐ | Easy | Amazon |
| 206 | Reverse Linked List | ⭐⭐⭐⭐⭐ | Easy | Amazon, Facebook, Apple |
| 237 | Delete Node | ⭐⭐⭐ | Medium | Apple |
| 题号 | 题目 | 频率 | 难度 | 公司 |
|---|---|---|---|---|
| 3 | Longest Substring | ⭐⭐⭐⭐⭐ | Medium | Amazon, Google, Facebook |
| 14 | Longest Common Prefix | ⭐⭐⭐ | Easy | |
| 20 | Valid Parentheses | ⭐⭐⭐⭐⭐ | Easy | Amazon, Google, Facebook |
中文 Chinese:
- ✅ 仔细阅读题目,理解输入输出
- ✅ 询问边界条件和限制
- ✅ 用例子验证理解
- ✅ 确认时间和空间复杂度要求
English:
- ✅ Carefully read and understand input/output
- ✅ Ask about edge cases and constraints
- ✅ Verify understanding with examples
- ✅ Confirm time/space complexity requirements
常见问题 Common Questions to Ask:
- 输入数组是否有序?Is the array sorted?
- 数组中是否有重复元素?Can there be duplicates?
- 输入规模大概多大?What's the input size range?
- 是否可以修改输入?Can I modify the input?
- 是否需要考虑负数/空值?Need to handle negatives/nulls?
中文 Chinese:
- ✅ 说出第一个想到的暴力解法
- ✅ 分析时间和空间复杂度
- ✅ 讨论优化方向
- ✅ 得到面试官同意后再写代码
English:
- ✅ Explain brute force solution first
- ✅ Analyze time and space complexity
- ✅ Discuss optimization opportunities
- ✅ Get approval before coding
思路模板 Approach Template:
1. Brute Force: "最简单的做法是..."
Time: O(?), Space: O(?)
2. Optimization: "可以通过...优化到..."
Time: O(?), Space: O(?)
3. Trade-offs: "如果用...换取...的话..."
中文 Chinese:
- ✅ 边写边解释
- ✅ 使用有意义的变量名
- ✅ 保持代码整洁
- ✅ 处理边界情况
English:
- ✅ Explain while coding
- ✅ Use meaningful variable names
- ✅ Keep code clean
- ✅ Handle edge cases
代码规范 Code Standards:
// ❌ Bad
func f(_ a: [Int]) -> Int {
var x = 0
for i in 0..<a.count {
x += a[i]
}
return x
}
// ✅ Good
func calculateSum(_ numbers: [Int]) -> Int {
var sum = 0
for number in numbers {
sum += number
}
return sum
}中文 Chinese:
- ✅ 用例子跑一遍代码
- ✅ 检查边界条件
- ✅ 考虑特殊情况
English:
- ✅ Walk through with examples
- ✅ Check edge cases
- ✅ Consider special cases
测试用例 Test Cases:
1. 正常情况 Normal case
2. 边界情况 Edge cases:
- 空数组 Empty array
- 单个元素 Single element
- 最大/最小值 Max/Min values
3. 特殊情况 Special cases:
- 重复元素 Duplicates
- 负数 Negative numbers
-
自我介绍
您好,我是...,目前在学习算法和数据结构。 这个项目是我的个人学习记录,包含了 X 道 LeetCode 题目。 我采用了工程化的方式组织代码,包含完整的测试和 CI/CD。 -
为什么学习算法?
为了提升编程能力和问题解决能力, 同时也为技术面试做准备。 通过系统化学习,我掌握了... -
遇到过什么困难?
最开始对某些算法模式不熟悉, 通过专题练习和多次复习逐渐掌握。 现在我建立了自己的算法模板库...
-
Self Introduction
Hi, I'm... Currently learning algorithms and data structures. This project is my personal learning journey with X LeetCode problems. I've organized it in an engineering way with full tests and CI/CD. -
Why studying algorithms?
To improve programming and problem-solving skills, and prepare for technical interviews. Through systematic learning, I've mastered... -
Challenges faced?
Initially struggled with some patterns, but improved through topic-based practice and reviews. Now I've built my own algorithm template library...
特点 Characteristics:
- 注重算法基础和编码能力
- 喜欢问系统设计
- 时间复杂度要求高
高频题型 Hot Topics:
- Array & String
- Tree & Graph
- Dynamic Programming
准备建议 Preparation:
- 熟练掌握各种数据结构
- 练习优化时间复杂度
- 多做 Medium/Hard 题目
特点 Characteristics:
- 重视 Leadership Principles
- 喜欢实际场景题目
- 关注代码质量
高频题型 Hot Topics:
- Array & Linked List
- Tree
- BFS/DFS
准备建议 Preparation:
- 准备行为问题(STAR 法则)
- 练习系统设计
- 关注边界情况处理
特点 Characteristics:
- 基础题目为主
- 注重思维过程
- 喜欢问变形题
高频题型 Hot Topics:
- Array & String
- Linked List
- Tree
准备建议 Preparation:
- 打好基础
- 练习举一反三
- 注重代码规范
00:00 - 02:00 寒暄介绍
02:00 - 07:00 理解题目,讨论思路
07:00 - 27:00 编写代码
27:00 - 32:00 测试验证
32:00 - 40:00 优化讨论
40:00 - 45:00 提问环节
卡壳了怎么办?
- 不要沉默,说出当前想法
- 回到最简单的方法
- 请求提示
- 尝试用例子推导
写错了怎么办?
- 承认错误,不要试图掩盖
- 快速定位问题
- 改正并解释
- 重新测试
- 复习高频题目
- 熟悉常用模板
- 准备好白板/编辑器
- 确认网络和环境
- 调整好心态
- 仔细理解题目
- 询问必要的问题
- 说出解题思路
- 编写清晰的代码
- 测试和优化
- 保持良好沟通
- 记录题目和思路
- 反思不足之处
- 总结经验教训
- 更新学习计划
展示这些能力可以加分 Show these skills for bonus points:
-
良好的沟通 Good Communication
- 清晰表达思路
- 及时反馈理解
-
代码质量 Code Quality
- 命名规范
- 注释清晰
- 结构合理
-
主动思考 Proactive Thinking
- 考虑边界情况
- 讨论优化方向
- 提出改进建议
-
测试意识 Testing Mindset
- 主动测试代码
- 找出潜在 bug
- 验证复杂度
- 🏠 首页 Home
- 📖 题解索引 Solutions Index
- 🎯 学习路线 Study Roadmap
- 💡 算法模板 Algorithm Templates
- 🎤 面试准备 Interview Prep
- ✅ 已完成: 19 题
- 🟢 Easy: 11 题
- 🟡 Medium: 8 题
- 🔴 Hard: 0 题
- 数组 Array (8)
- 链表 Linked List (6)
- 字符串 String (3)
- 数学 Math (4)
- 栈 Stack (2)
- 双指针 Two Pointers (6)
- 哈希表 Hash Table (4)
2025-10-26
- 初始化 Wiki
- 添加核心页面