# leetcode **Repository Path**: whfever/leetcode ## Basic Information - **Project Name**: leetcode - **Description**: 😏 LeetCode solutions in any programming language | 多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解 - **Primary Language**: Java - **License**: CC-BY-SA-4.0 - **Default Branch**: main - **Homepage**: https://doocs.gitee.io/leetcode - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 334 - **Created**: 2021-03-21 - **Last Updated**: 2021-03-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

LeetCode-GitHub-Doocs

languages open-source-organization LICENSE
stars forks

## 介绍 本项目包含 [LeetCode](https://leetcode-cn.com/problemset/all/)、[《剑指 Offer(第 2 版)》](https://leetcode-cn.com/problemset/lcof/)、[《程序员面试金典(第 6 版)》](https://leetcode-cn.com/problemset/lcci/)等题目的相关题解。所有题解均由多种编程语言实现,包括但不限于:Java、Python、C++、JavaScript、C#、Go,日常更新。欢迎 Star 关注本项目「[GitHub](https://github.com/doocs/leetcode) / [Gitee](https://gitee.com/doocs/leetcode)」,获取项目最新动态。 [English Version](/README_EN.md) ## 站点 - Netlify: https://lc.netlify.app - Gitee Pages: https://doocs.gitee.io/leetcode - GitHub Pages: https://doocs.github.io/leetcode ## LeetCode 全解 - [LeetCode](/solution/README.md) - [LeetCode 《剑指 Offer(第 2 版)》](/lcof/README.md) - [LeetCode 《程序员面试金典(第 6 版)》](/lcci/README.md) ## 基础算法通关 ### 排序算法 - [冒泡排序](/basic/sorting/BubbleSort/README.md) - [插入排序](/basic/sorting/InsertionSort/README.md) - [选择排序](/basic/sorting/SelectionSort/README.md) - [归并排序](/basic/sorting/MergeSort/README.md) - [快速排序](/basic/sorting/QuickSort/README.md) ### 查找算法 - [二分查找](/basic/searching/BinarySearch/README.md) - [二分查找 II](/basic/searching/BinarySearch-II/README.md) ## 面试高频考题 ### 数组 - [删除排序数组中的重复项](/solution/0000-0099/0026.Remove%20Duplicates%20from%20Sorted%20Array/README.md) - [移除元素](/solution/0000-0099/0027.Remove%20Element/README.md) - [移动零](/solution/0200-0299/0283.Move%20Zeroes/README.md) - [数组中重复的数字](/lcof/面试题03.%20数组中重复的数字/README.md) - [旋转数组](/solution/0100-0199/0189.Rotate%20Array/README.md) - [螺旋矩阵](/solution/0000-0099/0054.Spiral%20Matrix/README.md) - [两数之和](/solution/0000-0099/0001.Two%20Sum/README.md) - [三数之和](/solution/0000-0099/0015.3Sum/README.md) - [四数之和](/solution/0000-0099/0018.4Sum/README.md) - [较小的三数之和](/solution/0200-0299/0259.3Sum%20Smaller/README.md) - [最接近的三数之和](/solution/0000-0099/0016.3Sum%20Closest/README.md) - [合并两个有序数组](/solution/0000-0099/0088.Merge%20Sorted%20Array/README.md) - [寻找旋转排序数组中的最小值](/solution/0100-0199/0153.Find%20Minimum%20in%20Rotated%20Sorted%20Array/README.md) - [寻找旋转排序数组中的最小值 II](/solution/0100-0199/0154.Find%20Minimum%20in%20Rotated%20Sorted%20Array%20II/README.md) - [除自身以外数组的乘积](/solution/0200-0299/0238.Product%20of%20Array%20Except%20Self/README.md) ### 字符串 - [反转字符串中的元音字母](/solution/0300-0399/0345.Reverse%20Vowels%20of%20a%20String/README.md) - [字符串转换整数 (atoi)](/solution/0000-0099/0008.String%20to%20Integer%20%28atoi%29/README.md) - [赎金信](/solution/0300-0399/0383.Ransom%20Note/README.md) ### 链表 - [两数相加](/solution/0000-0099/0002.Add%20Two%20Numbers/README.md) - [从尾到头打印链表](/lcof/面试题06.%20从尾到头打印链表/README.md) - [删除链表的节点](/lcof/面试题18.%20删除链表的节点/README.md) - [移除链表元素](/solution/0200-0299/0203.Remove%20Linked%20List%20Elements/README.md) - [链表中倒数第 k 个节点](/lcci/02.02.Kth%20Node%20From%20End%20of%20List/README.md) - [两两交换链表中的节点](/solution/0000-0099/0024.Swap%20Nodes%20in%20Pairs/README.md) - [合并两个有序链表](/solution/0000-0099/0021.Merge%20Two%20Sorted%20Lists/README.md) - [合并 K 个排序链表](/solution/0000-0099/0023.Merge%20k%20Sorted%20Lists/README.md) - [对链表进行插入排序](/solution/0100-0199/0147.Insertion%20Sort%20List/README.md) - [排序链表](/solution/0100-0199/0148.Sort%20List/README.md) - [反转链表](/solution/0200-0299/0206.Reverse%20Linked%20List/README.md) - [反转链表 II](/solution/0000-0099/0092.Reverse%20Linked%20List%20II/README.md) - [重排链表](/solution/0100-0199/0143.Reorder%20List/README.md) - [旋转链表](/solution/0000-0099/0061.Rotate%20List/README.md) - [回文链表](/solution/0200-0299/0234.Palindrome%20Linked%20List/README.md) - [相交链表](/solution/0100-0199/0160.Intersection%20of%20Two%20Linked%20Lists/README.md) - [奇偶链表](/solution/0300-0399/0328.Odd%20Even%20Linked%20List/README.md) - [环形链表](/solution/0100-0199/0141.Linked%20List%20Cycle/README.md) - [环形链表 II](/solution/0100-0199/0142.Linked%20List%20Cycle%20II/README.md) - [设计链表](/solution/0700-0799/0707.Design%20Linked%20List/README.md) ### 二叉树 - [二叉树的前序遍历](/solution/0100-0199/0144.Binary%20Tree%20Preorder%20Traversal/README.md) - [二叉树的后序遍历](/solution/0100-0199/0145.Binary%20Tree%20Postorder%20Traversal/README.md) - [二叉树的中序遍历](/solution/0000-0099/0094.Binary%20Tree%20Inorder%20Traversal/README.md) - [对称二叉树](/solution/0100-0199/0101.Symmetric%20Tree/README.md) - [树的子结构](/lcof/面试题26.%20树的子结构/README.md) - [翻转二叉树](/solution/0200-0299/0226.Invert%20Binary%20Tree/README.md) - [二叉树的层次遍历](/solution/0100-0199/0102.Binary%20Tree%20Level%20Order%20Traversal/README.md) - [二叉树的层次遍历 II](/solution/0100-0199/0107.Binary%20Tree%20Level%20Order%20Traversal%20II/README.md) - [二叉树的最大深度](/solution/0100-0199/0104.Maximum%20Depth%20of%20Binary%20Tree/README.md) - [二叉树的最小深度](/solution/0100-0199/0111.Minimum%20Depth%20of%20Binary%20Tree/README.md) - [二叉树的所有路径](/solution/0200-0299/0257.Binary%20Tree%20Paths/README.md) - [路径总和](/solution/0100-0199/0112.Path%20Sum/README.md) - [路径总和 II](/solution/0100-0199/0113.Path%20Sum%20II/README.md) - [从前序与中序遍历序列构造二叉树](/solution/0100-0199/0105.Construct%20Binary%20Tree%20from%20Preorder%20and%20Inorder%20Traversal/README.md) - [从中序与后序遍历序列构造二叉树](/solution/0100-0199/0106.Construct%20Binary%20Tree%20from%20Inorder%20and%20Postorder%20Traversal/README.md) - [二叉搜索树的后序遍历序列](/lcof/面试题33.%20二叉搜索树的后序遍历序列/README.md) - [二叉树的最近公共祖先](/solution/0200-0299/0235.Lowest%20Common%20Ancestor%20of%20a%20Binary%20Search%20Tree/README.md) - [二叉搜索树的最近公共祖先](/solution/0200-0299/0236.Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree/README.md) - [将二叉搜索树转换为单链表](/lcci/17.12.BiNode/README.md) - [将二叉搜索树转化为排序的双向链表](/solution/0400-0499/0426.Convert%20Binary%20Search%20Tree%20to%20Sorted%20Doubly%20Linked%20List/README.md) ### 数学 - [只出现一次的数字](/solution/0100-0199/0136.Single%20Number/README.md) - [只出现一次的数字 II](/solution/0100-0199/0137.Single%20Number%20II/README.md) - [只出现一次的数字 III](/solution/0200-0299/0260.Single%20Number%20III/README.md) - [错误的集合](/solution/0600-0699/0645.Set%20Mismatch/README.md) - [二进制中 1 的个数](/lcof/面试题15.%20二进制中1的个数/README.md) - [计数质数](/solution/0200-0299/0204.Count%20Primes/README.md) - [不用加减乘除做加法](/lcof/面试题65.%20不用加减乘除做加法/README.md) - [丢失的数字](/solution/0200-0299/0268.Missing%20Number/README.md) ### 栈和队列 - [有效的括号](/solution/0000-0099/0020.Valid%20Parentheses/README.md) - [最小栈](/solution/0100-0199/0155.Min%20Stack/README.md) - [队列的最大值](/lcof/面试题59%20-%20II.%20队列的最大值/README.md) - [用栈实现队列](/solution/0200-0299/0232.Implement%20Queue%20using%20Stacks/README.md) - [用队列实现栈](/solution/0200-0299/0225.Implement%20Stack%20using%20Queues/README.md) - [逆波兰表达式求值](/solution/0100-0199/0150.Evaluate%20Reverse%20Polish%20Notation/README.md) - [最近的请求次数](/solution/0900-0999/0933.Number%20of%20Recent%20Calls/README.md) - [每日温度](/solution/0700-0799/0739.Daily%20Temperatures/README.md) - [基本计算器 II](/solution/0200-0299/0227.Basic%20Calculator%20II/README.md) ### 动态规划 - [最大子序和](/solution/0000-0099/0053.Maximum%20Subarray/README.md) - [乘积最大子序列](/solution/0100-0199/0152.Maximum%20Product%20Subarray/README.md) - [打家劫舍](/solution/0100-0199/0198.House%20Robber/README.md) - [打家劫舍 II](/solution/0200-0299/0213.House%20Robber%20II/README.md) - [最长上升子序列](/solution/0300-0399/0300.Longest%20Increasing%20Subsequence/README.md) - [俄罗斯套娃信封问题](/solution/0300-0399/0354.Russian%20Doll%20Envelopes/README.md) ### 混合问题 ### 数据库 - [组合两个表](/solution/0100-0199/0175.Combine%20Two%20Tables/README.md) - [第二高的薪水](/solution/0100-0199/0176.Second%20Highest%20Salary/README.md) - [第 N 高的薪水](/solution/0100-0199/0177.Nth%20Highest%20Salary/README.md) - [分数排名](/solution/0100-0199/0178.Rank%20Scores/README.md) ## 维护者 [Yang Libin](https://github.com/yanglbme): GitHub / Gitee 技术社区 @Doocs 创建者;开源组织 [@TheAlgorithms](https://github.com/TheAlgorithms) 核心成员之一。 ## 加入我们 刷编程题的最大好处就是可以锻炼解决问题的思维能力。相信我,「如何去思考」​ 本身也是一项需要不断学习和练习的技能。非常感谢前微软工程师、现蚂蚁金服技术专家 [@kfstorm](https://github.com/kfstorm) 贡献了本项目的所有 [C# 题解](https://github.com/doocs/leetcode/pull/245)。 如果你对本项目感兴趣,并且希望加入我们刷题大军,欢迎随时提交 [PR](https://github.com/doocs/leetcode/pulls)。请参考如下步骤: 1. 将本项目 fork 到你的个人 GitHub / Gitee 帐户,然后 clone 到你的本地机器; 1. 对项目做出一些变更,然后使用 git add、commit、push 等命令将你的变更提交到你的远程 GitHub / Gitee 仓库; 1. 将你的变更以 PR 的形式提交过来,项目的维护人员会在第一时间对你的变更进行 review! 1. 你也可以参考帮助文档「[GitHub](https://help.github.com/cn) / [Gitee](https://gitee.com/help)」了解更多细节。

how-to-contribute

[Gitpod.io](https://www.gitpod.io) 是一个免费的在线开发环境,你也可以使用它参与本项目。 [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/doocs/leetcode) ## 贡献者 非常感谢以下所有朋友对本项目的贡献,你们是最可爱的人! ## 赞助者 特别感谢以下个人、组织对本项目的赞助! > "_You help the developer community practice for interviews, and there is nothing better we could ask for._" -- [Alan Yessenbayev](https://opencollective.com/alan-yessenbayev) ## 许可证 知识共享 版权归属-相同方式共享 4.0 国际 公共许可证 [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fdoocs%2Fleetcode.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fdoocs%2Fleetcode?ref=badge_large)