# java-data-structures-and-algorithm **Repository Path**: gardenchan/java-data-structures-and-algorithm ## Basic Information - **Project Name**: java-data-structures-and-algorithm - **Description**: 总结必知必会的经典数据结构,分享本人LeetCode的高质量题解和经典好题。 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-12-06 - **Last Updated**: 2024-10-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README > **最新更新时间** 2020.12.05 > **欢迎读者点赞评论关注!阅读本文有任何疑问,欢迎评论交流。** > **其中**,本文收集的LeetCode题目及解答是博主在刷题中击败成绩比较好的,原则上收录击败(内存或耗时)超过99%的题目,不排除有些题目虽然击败成绩并没有达到99%+,但是由于博主觉得该题目比较有价值,值得进一步回顾和感受的,也会进行收录。因此,可以认为,本文收录的LeetCode题解都是比较优秀的解答,或者是比较优质的题目。LeetCode刷题的小白,可以根据本文的收录题目去刷题,每道题尾部都有该题在LeetCode的链接。目前,每道题目并没有编写解题思路,因为这一块需要很多时间去写,后面有时间了我会对每一道题写出解题思路,如果读者觉得需要某道题的解题思路,我会对该题提前补充解题思路。 > **最后**,十分欢迎评论交流,当然如果你觉得博主的工作对你有帮助,非常希望的得到你的关注! > **我们一起进步!!!**需要代码请到我的博客私信我。 # 我的博客地址,欢迎点赞评论交流 # https://blog.csdn.net/weixin_44870909 # 数据结构 [【数据结构 1】顺序表及其Java实现](https://blog.csdn.net/weixin_44870909/article/details/109387608) [【数据结构 2】单向链表及其Java实现](https://blog.csdn.net/weixin_44870909/article/details/109393154) [【数据结构 3】双向链表及其Java实现](https://blog.csdn.net/weixin_44870909/article/details/109394072) [【数据结构 4】栈及其Java实现](https://blog.csdn.net/weixin_44870909/article/details/109394399) [【数据结构 5】队列及其Java实现](https://blog.csdn.net/weixin_44870909/article/details/109394608) [【数据结构 6】符号表及其Java实现(使用链表实现)](https://blog.csdn.net/weixin_44870909/article/details/109430924) [【数据结构 7】二叉查找树及其Java实现](https://blog.csdn.net/weixin_44870909/article/details/109434290) [【数据结构 8】并查集及其Java实现](https://blog.csdn.net/weixin_44870909/article/details/110710392) [【数据结构 9】优先队列及其Java实现](https://blog.csdn.net/weixin_44870909/article/details/110727367) 【数据结构 10】从平衡树到红黑树的Java实现(待更新) 【数据结构 11】B树和B+树原理及其应用(待更新) 【数据结构 12】无向图及其Java实现(深度or广度优先搜索、路径查找) 【数据结构 13】有向图及其Java实现(拓扑排序)(待更新) 【数据结构 14】加权无向图及其Java实现(最小生成树【贪心】、【Prim】、【Kruskal】)(待更新) 【数据结构 15】加权有向图及其Java实现(最短路径Dijstra)(待更新) --- # 排序算法 [【排序算法系列 1】冒泡排序](https://blog.csdn.net/weixin_44870909/article/details/109190837) [【排序算法系列 2】选择排序](https://blog.csdn.net/weixin_44870909/article/details/109191134) [【排序算法系列 3】 插入排序](https://blog.csdn.net/weixin_44870909/article/details/109191243) [【排序算法系列 4】 高级排序——希尔排序(插入排序的改进)](https://blog.csdn.net/weixin_44870909/article/details/109191408) [【排序算法系列 5】 高级排序——归并排序](https://blog.csdn.net/weixin_44870909/article/details/109191614) [【排序算法系列 6】 高级排序——归并排序(由冒泡排序改进)](https://blog.csdn.net/weixin_44870909/article/details/109192101) [【排序算法系列 7】堆排序](https://blog.csdn.net/weixin_44870909/article/details/110728319) --- # LeetCode击败99%+【Java篇】 [【LeetCode击败99%+】罗马数字转整数](https://blog.csdn.net/weixin_44870909/article/details/109346472) [【LeetCode击败99%+】搜索插入位置](https://blog.csdn.net/weixin_44870909/article/details/109346960) [【LeetCode击败99%+】加一](https://blog.csdn.net/weixin_44870909/article/details/109347123) [【LeetCode击败99%+】搜索二维矩阵](https://blog.csdn.net/weixin_44870909/article/details/109347226) [【LeetCode击败99%+】二叉树的前序遍历](https://blog.csdn.net/weixin_44870909/article/details/109347384) [【LeetCode击败99%+】存在连续三个奇数的数组](https://blog.csdn.net/weixin_44870909/article/details/109347493) [【LeetCode击败99%+】矩阵对角线元素的和](https://blog.csdn.net/weixin_44870909/article/details/109347596) [【LeetCode击败99%+】相同的树](https://blog.csdn.net/weixin_44870909/article/details/109411844) [【LeetCode击败99%+】删除排序链表中的重复元素](https://blog.csdn.net/weixin_44870909/article/details/109411910) [【LeetCode击败99%+】合并两个有序链表](https://blog.csdn.net/weixin_44870909/article/details/109411943) [【LeetCode击败99%+】生成杨辉三角](https://blog.csdn.net/weixin_44870909/article/details/109411992) [【LeetCode击败99%+】二叉树的最大深度](https://blog.csdn.net/weixin_44870909/article/details/109429179) [【LeetCode击败99%+】将有序数组转换为二叉搜索树](https://blog.csdn.net/weixin_44870909/article/details/109548626) [【LeetCode击败99%+】平衡二叉树](https://blog.csdn.net/weixin_44870909/article/details/109548743) [【LeetCode击败99%+】二叉树路径总和](https://blog.csdn.net/weixin_44870909/article/details/109548920) [【LeetCode击败99%+】杨辉三角的第 k 行](https://blog.csdn.net/weixin_44870909/article/details/109549137) [【LeetCode击败99%+】买卖股票的最佳时机](https://blog.csdn.net/weixin_44870909/article/details/109549886) [【LeetCode击败99%+】数组只出现一次的数字](https://blog.csdn.net/weixin_44870909/article/details/109549946) [【LeetCode击败99%+】环形链表(使用快慢指针检测链表中是否有环)](https://blog.csdn.net/weixin_44870909/article/details/109549983) [【LeetCode击败99%+】Excel列表名称和对应正整数的相互转换](https://blog.csdn.net/weixin_44870909/article/details/109550155) [【LeetCode击败99%+】二叉树的右视图](https://blog.csdn.net/weixin_44870909/article/details/109550240) [【LeetCode击败99%+】快乐数](https://blog.csdn.net/weixin_44870909/article/details/109550312) [【LeetCode击败99%+】移除链表指定元素](https://blog.csdn.net/weixin_44870909/article/details/109550356) [【LeetCode击败99%+】用队列实现栈](https://blog.csdn.net/weixin_44870909/article/details/109550389) [【LeetCode击败99%+】翻转二叉树](https://blog.csdn.net/weixin_44870909/article/details/109550431) [【LeetCode击败99%+】判断某整数是否2的幂](https://blog.csdn.net/weixin_44870909/article/details/109550465) [【LeetCode击败99%+】删除链表中的节点](https://blog.csdn.net/weixin_44870909/article/details/109550492) [【LeetCode击败99%+】非负整数各位相加](https://blog.csdn.net/weixin_44870909/article/details/109550539) [【LeetCode击败99%+】丑数](https://blog.csdn.net/weixin_44870909/article/details/109550604) [【LeetCode击败99%+】丢失的数字](https://blog.csdn.net/weixin_44870909/article/details/109550634) [【LeetCode击败99%+】第一个错误的版本](https://blog.csdn.net/weixin_44870909/article/details/109550666) [【LeetCode击败99%+】Nim 游戏](https://blog.csdn.net/weixin_44870909/article/details/109550699) [【LeetCode击败99%+】反转字符串](https://blog.csdn.net/weixin_44870909/article/details/109550723) [【LeetCode击败99%+】猜数字大小](https://blog.csdn.net/weixin_44870909/article/details/109550741) [【LeetCode击败99%+】用栈实现队列](https://blog.csdn.net/weixin_44870909/article/details/109611198) [【LeetCode击败99%+】厄拉多塞筛法计数质数](https://blog.csdn.net/weixin_44870909/article/details/109611239) [【LeetCode击败99%+】找字符串中的不同字符](https://blog.csdn.net/weixin_44870909/article/details/109611272) [【LeetCode击败99%+】不使用加号和减号计算两整数之和](https://blog.csdn.net/weixin_44870909/article/details/109611306) [【LeetCode击败99%+】数组中的第三大的数](https://blog.csdn.net/weixin_44870909/article/details/109611359) [【LeetCode击败99%+】句子中的单词计数(字符串中的单词数)](https://blog.csdn.net/weixin_44870909/article/details/109611401) [【LeetCode击败99%+】找到所有数组中消失的数字](https://blog.csdn.net/weixin_44870909/article/details/109611427) [【LeetCode击败99%+】重复的子字符串](https://blog.csdn.net/weixin_44870909/article/details/109611460) [【LeetCode击败99%+】汉明距离](https://blog.csdn.net/weixin_44870909/article/details/109611495) [【LeetCode击败99%+】十进制整数的反码](https://blog.csdn.net/weixin_44870909/article/details/109611590) [【LeetCode击败99%+】给尽可能多的孩子分发饼干](https://blog.csdn.net/weixin_44870909/article/details/109611628) [【LeetCode击败99%+】密钥格式化](https://blog.csdn.net/weixin_44870909/article/details/109611685) [【LeetCode击败99%+】字母异位词分组](https://blog.csdn.net/weixin_44870909/article/details/109749191) [【LeetCode击败99%+】检测大写字母](https://blog.csdn.net/weixin_44870909/article/details/109749260) [【LeetCode击败99%+】下一个更大元素](https://blog.csdn.net/weixin_44870909/article/details/109749334) [【LeetCode击败99%+】构造矩形](https://blog.csdn.net/weixin_44870909/article/details/109749423) [【LeetCode击败99%+】最大连续1的个数](https://blog.csdn.net/weixin_44870909/article/details/109749494) [【LeetCode击败99%+】逆序打印不可变链表](https://blog.csdn.net/weixin_44870909/article/details/109766953) [【LeetCode击败99%+】一维数组的动态和](https://blog.csdn.net/weixin_44870909/article/details/109773762) [【LeetCode击败99%+】两个稀疏向量的点积](https://blog.csdn.net/weixin_44870909/article/details/109774083) [【LeetCode击败99%+】左旋转字符串](https://blog.csdn.net/weixin_44870909/article/details/109828616) [【LeetCode击败99%+】重新排列数组](https://blog.csdn.net/weixin_44870909/article/details/109828695) [【LeetCode击败99%+】删除中间节点](https://blog.csdn.net/weixin_44870909/article/details/109828804) [【LeetCode击败99%+】拥有最多糖果的孩子](https://blog.csdn.net/weixin_44870909/article/details/109828896) [【LeetCode击败99%+】宝石与石头](https://blog.csdn.net/weixin_44870909/article/details/109828966) [【LeetCode击败99%+】设计停车系统](https://blog.csdn.net/weixin_44870909/article/details/109829047) [【LeetCode击败99%+】数组异或操作](https://blog.csdn.net/weixin_44870909/article/details/109830001) [【LeetCode击败99%+】找出变位映射](https://blog.csdn.net/weixin_44870909/article/details/109954163) [【LeetCode击败99%+】整数的各位积和之差](https://blog.csdn.net/weixin_44870909/article/details/109954260) [【LeetCode击败99%+】拿硬币](https://blog.csdn.net/weixin_44870909/article/details/109954376) [【LeetCode击败99%+】IP 地址无效化](https://blog.csdn.net/weixin_44870909/article/details/109954428) [【LeetCode击败99%+】单行键盘](https://blog.csdn.net/weixin_44870909/article/details/109954584) [【LeetCode击败99%+】完全二叉树的节点个数](https://blog.csdn.net/weixin_44870909/article/details/110223895) [【LeetCode击败99%+】将数字变成 0 的操作次数](https://blog.csdn.net/weixin_44870909/article/details/110224171) [【LeetCode击败99%+】访问所有点的最小时间](https://blog.csdn.net/weixin_44870909/article/details/110224302) [【LeetCode击败99%+】在既定时间做作业的学生人数](https://blog.csdn.net/weixin_44870909/article/details/110224483) [【LeetCode击败99%+】速算机器人](https://blog.csdn.net/weixin_44870909/article/details/110224598) [【LeetCode击败99%+】寻找所有的独生节点](https://blog.csdn.net/weixin_44870909/article/details/110224822) [【LeetCode击败99%+】最小高度树](https://blog.csdn.net/weixin_44870909/article/details/110225021) [【LeetCode击败99%+】重新排列字符串](https://blog.csdn.net/weixin_44870909/article/details/110225181) [【LeetCode击败99%+】上升下降字符串](https://blog.csdn.net/weixin_44870909/article/details/110226697) [【LeetCode击败99%+】将每个元素替换为右侧最大元素](https://blog.csdn.net/weixin_44870909/article/details/110226469) [【LeetCode击败99%+】二叉搜索树的范围和](https://blog.csdn.net/weixin_44870909/article/details/110226339) [【LeetCode击败99%+】打印从1到最大的n位数](https://blog.csdn.net/weixin_44870909/article/details/110226242) [【LeetCode击败99%+】合并二叉树](https://blog.csdn.net/weixin_44870909/article/details/110226167) [【LeetCode击败99%+】链表中倒数第k个节点](https://blog.csdn.net/weixin_44870909/article/details/110226112) [【LeetCode击败99%+】二叉树的镜像](https://blog.csdn.net/weixin_44870909/article/details/110225484) [【LeetCode击败99%+】二叉树的深度](https://blog.csdn.net/weixin_44870909/article/details/110225406) [【LeetCode击败99%+】阿姆斯特朗数](https://blog.csdn.net/weixin_44870909/article/details/110226530) [【LeetCode击败99%+】数组中两元素的最大乘积](https://blog.csdn.net/weixin_44870909/article/details/110226634) [【LeetCode击败99%+】统计作战单位数](https://blog.csdn.net/weixin_44870909/article/details/110674236) [【LeetCode击败99%+】保持城市天际线](https://blog.csdn.net/weixin_44870909/article/details/110674369) [【LeetCode击败99%+】合并两个链表](https://blog.csdn.net/weixin_44870909/article/details/110674498) [【LeetCode击败99%+】层数最深叶子节点的和](https://blog.csdn.net/weixin_44870909/article/details/110674531) [【LeetCode击败99%+】祖父节点值为偶数的节点和](https://blog.csdn.net/weixin_44870909/article/details/110674586) [【LeetCode击败99%+】找到 N 叉树的根节点](https://blog.csdn.net/weixin_44870909/article/details/110674631) [【LeetCode击败99%+】嵌套列表权重和](https://blog.csdn.net/weixin_44870909/article/details/110674693) [【LeetCode击败99%+】子集](https://blog.csdn.net/weixin_44870909/article/details/110674720) [【LeetCode击败99%+】你可以获得的最大硬币数目](https://blog.csdn.net/weixin_44870909/article/details/110674744) [【LeetCode击败99%+】分割平衡字符串](https://blog.csdn.net/weixin_44870909/article/details/110674774) [【LeetCode击败99%+】最富有客户的资产总量](https://blog.csdn.net/weixin_44870909/article/details/110674807) [【LeetCode击败99%+】二叉树的最近公共祖先 III](https://blog.csdn.net/weixin_44870909/article/details/110674839) ----- # LeetCode击败99%+【MySQL篇】 [【LeetCode击败99%+】组合两个表](https://blog.csdn.net/weixin_44870909/article/details/109749555) [【LeetCode击败99%+】MySQL——产品销售分析 I](https://blog.csdn.net/weixin_44870909/article/details/110224025) [【LeetCode击败99%+】MySQL——查找重复的电子邮箱](https://blog.csdn.net/weixin_44870909/article/details/110224704) [【LeetCode击败99%+】MySQL——大的国家](https://blog.csdn.net/weixin_44870909/article/details/110225299) [【LeetCode击败99%+】MySQL——银行账户概要 II](https://blog.csdn.net/weixin_44870909/article/details/110674314) [【LeetCode击败99%+】MySQL——向公司CEO汇报工作的所有人](https://blog.csdn.net/weixin_44870909/article/details/110674419) [【LeetCode击败99%+】MySQL——求团队人数](https://blog.csdn.net/weixin_44870909/article/details/110674455) [【LeetCode击败99%+】MySQL——直线上的最近距离](https://blog.csdn.net/weixin_44870909/article/details/110674481)