• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    C++
  • Created about 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🔥 🔥 High frequent interview LeetCode 100 for FaceBook,Linkedin,Amazon,Google,Microsoft. More importantly, the problems' solutions are provided,include C++, Python and Java.

LeetCode4FLAG  

🌍 English | 简体中文| 日本語 | Українською



CircleCI Version No. Code License Chinese Version

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 !

高频合集答题模板打卡群📕 Docs


Note: Please raise an issue for any suggestions, corrections, and feedback.


Buy Me A Coffee

Index


Top100

Company Level LeetCode Link Code ✅ AC

Amazon
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

Google
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

FaceBook
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

LinkedIn
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

MicroSoft
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

Buy Me A Coffee


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

算法思维+算法模板

回溯

result = []
def backtrack(路径, 选择列表):
    if 满足结束条件:
        result.add(路径)
        return

    for 选择 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


Index

Community


Index

License

知识共享许可协议


Index

🚀 知识星球

专为求职面试中算法与数据结构的小伙伴,创了学习交流/刷题群(知识星球)!想要最快的提升算法与数据结构技能,和更多小伙伴一起来吧!进阶面试八股文,大厂面经

💖 Support this project

Donating to help me continue working on this project. BuymeaCoffee

Buy Me A Coffee

Donate with Paypal     Donate with AliPay | Donate with WeChat

2021 © Charmve.

More Repositories

1

Surface-Defect-Detection

📈 目前最大的工业缺陷检测数据库及论文集 Constantly summarizing open source dataset and critical papers in the field of surface defect research which are of great importance.
Python
2,698
star
2

computer-vision-in-action

A computer vision closed-loop learning platform where code can be run interactively online. 学习闭环《计算机视觉实战演练:算法与应用》中文电子书、源码、读者交流社区(持续更新中 ...) 📘 在线电子书 https://charmve.github.io/computer-vision-in-action/ 👇项目主页
Jupyter Notebook
2,375
star
3

BLE-Security-Attack-Defence

✨ Purpose only! The dangers of Bluetooth Low Energy(BLE)implementations: Unveiling zero day vulnerabilities and security flaws in modern Bluetooth LE stacks.
Python
264
star
4

CppMaster

C++ Master Learning Roadmap, especially for AIoT and C++ advanced SWE
C++
262
star
5

Practicum4ECE

「一名普通电子信息本科生的项目实践管理」将大学阶段的实训内容,按照专业课程设计(包括上机实验、课程设计、下学年的毕业设计等)、竞赛项目、科创项目、小型编程项目这四个门类进行整理汇总。
C
113
star
6

VOGUE-Try-On

Personal repository for "VOGUE: Try-On by StyleGAN Interpolation Optimization" (CVPR 2021). SOTA results for garments to deform according to the given body shape, while preserving pattern and material details.
HTML
89
star
7

OpenCC

Automatic driving long tail / corner cases scenarios dataset (Anomaly detection)
87
star
8

awesome-scene-text-detection

Tracking the latest progress in Scene Text Detection and Recognition: Must-read papers well organized with code and dataset
75
star
9

OccNet-Course

国内首个占据栅格网络全栈课程《从BEV到Occupancy Network,算法原理与工程实践》,包含端侧部署。Surrounding Semantic Occupancy Perception Course for Autonomous Driving (docs, ppt and source code) 课程主页:http://111.229.117.200:7001/
Python
75
star
10

Mirror-Glass-Detection

🍸 Mirror & Glass Detection in Real-world Scenes
Python
72
star
11

PaperWeeklyAI

📚「@MaiweiAI」Studying papers in the fields of computer vision, NLP, and machine learning algorithms every week.
Jupyter Notebook
63
star
12

OpenCS-Courses

🎓 Path to a free self-taught education in Computer Science!
58
star
13

Awesome-Lane-Detection

A paper list with code of lane detection.
Python
52
star
14

Semantic-Segmentation-PyTorch

PyTorch implementation for Semantic Segmentation, include FCN, U-Net, SegNet, GCN, PSPNet, Deeplabv3, Deeplabv3+, Mask R-CNN, DUC, GoogleNet, and more dataset
Python
48
star
15

autopilot-perception

End to End Autopilot Perception Playbook
HTML
46
star
16

iQuant

HTML
40
star
17

LightCube

A Design of 3D Dynamic Display System Based on Voice Control. ✨ Purpose only! Copyright and commercial use rights are received.
C
40
star
18

Charmve

🤡 About Me.
Python
38
star
19

PyStegosploit

PoC - Exploit Delivery via Steganography and Polyglots, CVE-2014-0282
HTML
37
star
20

transparent-object-segmentation

💎 Transparent objects such as windows and bottles made by glass widely exist in the real world. Segmenting transparent objects is challenging because these objects have diverse appearance inherited from the image background, making them had similar appearance with their surroundings.
32
star
21

TimeWarp

🐶 「Updating ...」Replacing Real-Time the High-Resolution Meeting Background Freely
Python
29
star
22

StegaStamp-plus

Improved the original repo, 'Invisible Hyperlinks in Physical Photographs', embedded with longer string than the original
Jupyter Notebook
25
star
23

SNE-RoadSeg2

🌱 SNE-RoadSeg in PyTorch, ECCV 2020 by Rui (Ranger) Fan & Hengli Wang, but now we have improved it.
Python
24
star
24

AccANN

🐆 A compiler from AI model to RTL (Verilog) accelerator in FPGA hardware with auto design space exploration for *AdderNet*
15
star
25

AR-DAO

AR-DAO,A decentralized autonomous organization (DAO) that enables users to forge NFTs through augmented reality (AR) and participate in various gaming and social activities. 一个让用户通过增强现实(AR)铸造NFT并参与不同游戏等社交活动的去中心化自治组织(DAO)https://github.com/Charmve/AR-DAO/wiki
JavaScript
14
star
26

gpt-eyes

I GAVE GPT-4 EYES!
JavaScript
10
star
27

EmotionCube

🐾 EmotionCube: An intelligent companion robot is designed based on expression recognition and intelligent speech.
C
9
star
28

Charmve.github.io

I'm here! 👋 Personal Home Page 🐶
HTML
8
star
29

steganography.js

Hide secret messages with JavaScript with steganography.js
JavaScript
5
star
30

PuppyGo

vision language model and large language model powered embodied robot
5
star
31

NotOnlyPaper

PaperEasy = arXiv + code + video + tutorial + Colab/demo
JavaScript
5
star
32

AlphaFold-baseline

This package provides an basic implementation of the contact prediction network used in AlphaFold 1 for beginner, associated model weights and CASP13 dataset as used for CASP13 (2018) and published in Nature
Python
4
star
33

mapless-course

No HDMap, Only Vision Perception
4
star
34

Bluetooth-Location_2D

indoor position based-on Bluetooth low energy in 2d space
Java
3
star
35

B1ueB0y-BLE-Fuzzing

An awesome toolkit for testing the BLE device, chip and Protocol stack
2
star
36

jsFlow

🏄 A Lightweight Web Browser-based Machine Learning Framework
CSS
2
star
37

LocalPay

非接触式离线支持方案
1
star
38

NumPyCNN

Building Convolutional Neural Networks From Scratch using NumPy
Python
1
star
39

Less-is-More

🌈 Art of README in GitHub, #Less is More#.
1
star
40

ScenesGen

自动驾驶算法系列课程之《场景数据生成》
1
star
41

weather-app

SCSS
1
star
42

Wind-Pendulum-Controlling-System

2015年风力摆控制系统赛题(B题)解析+源代码开源 A Wind Pendulum Controlling System
1
star
43

SimElectronicGun

基于视觉感知的模拟电磁曲射炮 (2019年全国大学生电子设计竞赛H题) 全国二等奖作品
C
1
star
44

qbot_pro

Jupyter Notebook
1
star