Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charmve/leetcode4flag
🔥 🔥 High frequent interview LeetCode 100 for FaceBook,Linkedin,Amazon,Google,Microsoft. More importantly, the problems' solutions are provided,include C++, Python and Java.
https://github.com/charmve/leetcode4flag
amazon bytedance coding coding-challenge coding-interviews cpp facebook google google-interview interview interview-preparation interview-questions java jobs leetcode leetcode-solutions lintcode lintcode-solutions microsoft offer
Last synced: 3 months ago
JSON representation
🔥 🔥 High frequent interview LeetCode 100 for FaceBook,Linkedin,Amazon,Google,Microsoft. More importantly, the problems' solutions are provided,include C++, Python and Java.
- Host: GitHub
- URL: https://github.com/charmve/leetcode4flag
- Owner: Charmve
- Created: 2020-10-12T15:12:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-09T08:37:52.000Z (over 2 years ago)
- Last Synced: 2024-05-23T09:32:10.492Z (8 months ago)
- Topics: amazon, bytedance, coding, coding-challenge, coding-interviews, cpp, facebook, google, google-interview, interview, interview-preparation, interview-questions, java, jobs, leetcode, leetcode-solutions, lintcode, lintcode-solutions, microsoft, offer
- Language: C++
- Homepage: https://github.com/Charmve
- Size: 463 KB
- Stars: 112
- Watchers: 2
- Forks: 32
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
LeetCode4FLAG
🌍 English | [简体中文](README-zh_CN.md)| [日本語](README-jp_JP.md) | [Українською](README-uk_UA.md)
High frequent interview LeetCode test for FaceBook, Linkedin, Amazon, Google. More importantly, the problems' solutions are provided in C/C++, Python and Java. Offer, Offer, Offer !
----
Note: Please raise an issue for any suggestions, corrections, and feedback.- [2020年最新FLAMG面试频率最高的127道题.xlsx](https://github.com/Charmve/LeetCode4FLAG/raw/main/2020最新-FLAMG面试频率最高的127道题.xlsx)
- [Google最常考的40道动态规划题.xlsx](https://github.com/Charmve/LeetCode4FLAG/raw/main/Google最常考的40道动态规划题.xlsx)
- [FaceBook高频题100道.xlsx](https://github.com/Charmve/LeetCode4FLAG/raw/main/Facebook高频题100道.xls)
- CodeTop持续更新 https://codetop.cc/home
## Index
- 🔥 [Top100](#top100)
- 💠 [Classification](#classification)
- 📕 [算法思维+算法模板](#算法思维算法模板)
- :open_file_folder: [面经C++/后端/算法](https://blog.csdn.net/charmve/category_9622929.html)
- 👥 [Community](#community)
- :sparkling_heart: [Support](#-support-this-project)
## Top100
Company
Level
LeetCode Link
Code
✅ AC
Easy
✂️ 74. Search a 2D Matrix
2021-09-30
🐼 1. Two Sum
📈 21. Merge Two Sorted Lists
🔎 107. Binary Tree Level Order Traversal II
👑 32. Longest Valid Parentheses
🎡 20. Valid Parentheses
🌄 200. Number of Islands
🐋 202. Happy Number
🐑 1120. Maximum Average Subtree
🐧 543. Diameter of Binary Tree
Medium
⛺ 297. Serialize and Deserialize Binary Tree
🌈 240. Search a 2D Matrix II
🚀 124. Binary Tree Maximum Path Sum
Hard
⛺ 297. Serialize and Deserialize Binary Tree
🌈 240. Search a 2D Matrix II
Easy
🚠 94. Binary Tree Inorder Traversal
⛵ 863. All Nodes Distance K in Binary Tree
📈 21. Merge Two Sorted Lists
🔎 107. Binary Tree Level Order Traversal II
👑 32. Longest Valid Parentheses
🎡 20. Valid Parentheses
🌄 200. Number of Islands
🐋 202. Happy Number
🐑 1120. Maximum Average Subtree
🐏 543. Diameter of Binary Tree
Medium
⛵ 494. Target Sum
🚁 938. Range Sum of BST
🚀 124. Binary Tree Maximum Path Sum
Hard
⛺ 173. Binary Search Tree Iterator
🌈 239. Sliding Window Maximum
Easy
🚠 833. Find And Replace in String
🌄 200. Number of Islands
🐠 67. Add Binary
Medium
🚩 90. Subsets II
🍐 17. Letter Combinations of a Phone Number
🚁 525. Contiguous Array
Hard
🎄 126. Word Ladder II
🎑 85. Maximal Rectangle
Easy
🎏 152. Maximum Product Subarray
🍋 678. Valid Parenthesis String
Medium
⛵ 245. Shortest Word Distance III
🚁 178. Rank Scores
Hard
⛺ 173. Binary Search Tree Iterator
🌈 239. Sliding Window Maximum
Easy
🎑 215. Kth Largest Element in an Array
🍋 678. Valid Parenthesis String
Medium
⛵ 236. Lowest Common Ancestor of a Binary Tree
🚁 剑指 Offer 51. 数组中的逆序对
Hard
⛺ 99. Recover Binary Search Tree
🌈 239. Sliding Window Maximum
[Index](#index)
## Classification
Algorithm
LeetCode Link
Level
Code
✅ AC
Dynamic Programming
动态规划
--> 解题模板
⛺ 568. Maximum Vacation Days
⭐⭐⭐⭐⭐
🌈 70. Climbing Stairs
⭐⭐
🚀 10. Regular Expression Matching
⭐⭐⭐⭐⭐
⛺ 198. House Robber
⭐⭐
🌈 139. Word Break
⭐⭐⭐
🎏 152. Maximum Product Subarray
⭐⭐⭐⭐⭐
🌈 91. Decode Ways
⭐⭐⭐⭐
🐼 72. Edit Distance
⭐⭐⭐⭐⭐
Divide & Conquer
分治思想
--> 解题模板
✂️ 4. Median of Two Sorted Arrays
⭐⭐⭐⭐⭐
🐼 23. Merge k Sorted Lists
⭐⭐⭐⭐⭐
📈 110. Balanced Binary Tree
⭐⭐
🚀 124. Binary Tree Maximum Path Sum
⭐⭐⭐⭐⭐
🐼 98. Validate Binary Search Tree
⭐⭐⭐
Dichotomy
二分法
--> 解题模板
✂️ 153. Find Minimum in Rotated Sorted Array
⭐⭐⭐
🐼 33. Search in Rotated Sorted Array
⭐⭐⭐
📈 69. Sqrt(x)
⭐⭐
🔎 29. Divide Two Integers
⭐⭐⭐
🐼 162. Find Peak Element
⭐⭐⭐
Recursion
递归
--> 解题模板
✂️ 22. 括号生成
⭐⭐⭐⭐⭐
🐼 89. 格雷编码
⭐⭐⭐
📈 110. 平衡二叉树
⭐⭐
📈 17. 电话号码的字母组合
⭐⭐⭐
📈 46. 全排列
⭐⭐⭐⭐
🔎 124. 二叉树中的最大路径和
⭐⭐⭐⭐⭐
Sorting Algorithm
排序算法
--> 解题模板
✂️ 215. 数组中的第K个最大元素
⭐⭐⭐⭐
🐼 LintCode. 无序数组K小元素
⭐⭐⭐
📈 629. K个逆序对数组
⭐⭐⭐
🐼 剑指 Offer 51. 数组中的逆序对
⭐⭐⭐
📈 327. 区间和的个数
⭐⭐⭐⭐⭐
🔎 LintCode 399.Nuts & Bolts Problem-Nuts 和 Bolts 的问题
⭐⭐⭐⭐
🐼 899. 有序队列
⭐⭐⭐⭐⭐
🔎 376. 摆动序列
⭐⭐⭐
Traverse/Visit
遍历
--> 解题模板
✂️ 123. 买卖股票的最佳时机 III
⭐⭐⭐⭐
🐼 644. 最大子段和 II
⭐⭐⭐⭐
📈 102. 二叉树的层序遍历
⭐⭐⭐
🐼 144. 二叉树的前序遍历
⭐⭐⭐
📈 145. 二叉树的后序遍历
⭐⭐⭐
🔎 987. 二叉树的垂序遍历
⭐⭐⭐⭐⭐
🔎 257. 二叉树的所有路径
⭐⭐
Dual Pointer Algorithm
双指针算法
--> 解题模板
✂️ 剑指 Offer 48. 最长不含重复字符的子字符串
⭐⭐⭐
🐼 11. 盛最多水的容器
⭐⭐⭐
📈 42. 接雨水
⭐⭐⭐
#双指针-two-pointers
📈 647. 回文子串
⭐⭐⭐
✂️ 92. 反转链表 II
⭐⭐⭐
🔎 142. 环形链表 II
⭐⭐⭐⭐⭐
Breadth First Search
宽度/广度优先搜索
--> 解题模板
✂️ 127. 单词接龙
⭐⭐⭐⭐
🐼 200. 岛屿数量
⭐⭐⭐⭐⭐
📈 102. 二叉树的层序遍历
⭐⭐⭐⭐⭐
📈 133. 克隆图
⭐⭐⭐⭐
📈 107. 二叉树的层序遍历 II
⭐⭐⭐
🔎 199. 二叉树的右视图
⭐⭐⭐
Depth First Search
深度优先搜索
--> 解题模板
✂️ 111. 二叉树的最小深度
⭐⭐⭐
🐼 面试题 05.01. 插入
⭐⭐⭐⭐⭐
📈 126. 单词接龙 II
⭐⭐⭐
📈 131. 分割回文串
⭐⭐⭐
📈 51. N 皇后
⭐⭐⭐⭐
🔎 107. Binary Tree Level Order Traversal II
⭐⭐⭐
[Index](#index)
# 算法思维+[算法模板](./题解模板.md)
## 回溯
```
result = []
def backtrack(路径, 选择列表):
if 满足结束条件:
result.add(路径)
returnfor 选择 in 选择列表:
做选择
backtrack(路径, 选择列表)
撤销选择
```
LeetCode 22. Generate Parentheses https://leetcode-cn.com/problems/generate-parentheses/
Given ``n`` pairs of parentheses, write a function to generate all combinations of well-formed parentheses.**Example 1:**
```
Input: n = 3
Output: ["((()))","(()())","(())()","()(())","()()()"]
```
**Example 2:**
```
Input: n = 1
Output: ["()"]
```**Constraints:**
``1 <= n <= 8``
```
void backtrack(int n, int i, string& track) {
// i 代表当前的位置,共 2n 个位置
// 穷举到最后一个位置了,得到一个长度为 2n 组合
if (i == 2 * n) {
print(track);
return;
}// 对于每个位置可以是左括号或者右括号两种选择
for choice in ['(', ')'] {
track.push(choice); // 做选择
// 穷举下一个位置
backtrack(n, i + 1, track);
track.pop(choice); // 撤销选择
}
}
```See more -> [题解模板.md](./题解模板.md)
[Index](#index)
# Community
- We have a discord server! [![Discord](https://img.shields.io/discord/744385009028431943.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/9BBt5BndMx) This should be your first stop to talk with other Coding friends. Why don't you introduce yourself right now? [Join the Coding channel in LeetCode4FLAG Discord](https://discord.gg/9BBt5BndMx)
- You can also interact through [GitHub issues](https://github.com/Charmve/LeetCode4FLAG/issues). If there is any problem, or a change needs to be made to the repo, this is the place to start the conversation. Read more [here](CONTRIBUTING.md).
- Subscribe to our [Offical Account with WeChat](https://github.com/Charmve/PaperWeeklyAI/blob/master/MaiweiAI-com.png?raw=true).
[Index](#index)
# License
[Index](#index)
## :rocket: 知识星球
专为求职面试中算法与数据结构的小伙伴,创了学习交流/刷题群(知识星球)!想要最快的提升算法与数据结构技能,和更多小伙伴一起来吧!进阶面试八股文,大厂面经
## 💖 Support this project
Donating to help me continue working on this project.
2021 © Charmve.