Leetcode Scala 实现
---

1. 早期学习时写的
2. 后期工作时写的(不同时期写法不同)
3. 按数据结构划分
4. @unchecked 表示最优解仍不能AC，与极端case有关

## 树

* [树的遍历](./src/main/scala/io/github/dreamylost/BTT.scala)
* [镜像二叉树 迭代](./src/main/scala/io/github/dreamylost/Leetcode_Interview_27.scala)
* [翻转树](./src/main/scala/io/github/dreamylost/Leetcode_226_Tree.scala)
* [判断子树](./src/main/scala/io/github/dreamylost/Leetcode_572_Tree.scala)
* [合并二叉树](./src/main/scala/io/github/dreamylost/Leetcode_617_Tree.scala)
* [树的对称](./src/main/scala/io/github/dreamylost/Leetcode_101_Tree.scala)
* [树的高度](./src/main/scala/io/github/dreamylost/Leetcode_104_Tree.scala)
* [判断平衡树](./src/main/scala/io/github/dreamylost/Leetcode_110_Tree.scala)  
* [二叉树的层平均值](./src/main/scala/io/github/dreamylost/Leetcode_637_Tree.scala)  
* [找出二叉树中第二小的节点](./src/main/scala/io/github/dreamylost/Leetcode_671_Tree.scala)
* [N叉树的后序遍历](./src/main/scala/io/github/dreamylost/LeetCode_590.scala)
* [N叉树的前序遍历](./src/main/scala/io/github/dreamylost/Leetcode_589.scala)
* [N叉树的最大深度](./src/main/scala/io/github/dreamylost/Leetcode_559.scala)
* [二叉搜索树的最近公共祖先](./src/main/scala/io/github/dreamylost/Leetcode_235.scala)
* [统计左叶子节点的和](./src/main/scala/io/github/dreamylost/Leetcode_404_Tree.scala)
* [最小路径](./src/main/scala/io/github/dreamylost/Leetcode_111_Tree.scala)
* [判断路径和是否等于一个数](./src/main/scala/io/github/dreamylost/Leetcode_112_Tree.scala)
* [间隔遍历](./src/main/scala/io/github/dreamylost/Leetcode_337_Tree.scala)
* [两节点的最长路径](./src/main/scala/io/github/dreamylost/Leetcode_543_Tree.scala)
* [路径总和 III](./src/main/scala/io/github/dreamylost/Leetcode_437_Tree.scala)
* [二叉搜索树中的众数](./src/main/scala/io/github/dreamylost/Leetcode_501.scala)
* [二叉搜索树的最小绝对差](./src/main/scala/io/github/dreamylost/Leetcode_530.scala)
* [二叉树的堂兄弟节点](./src/main/scala/io/github/dreamylost/Leetcode_993.scala)
* [把二叉搜索树转换为累加树](./src/main/scala/io/github/dreamylost/Leetcode_538.scala)
* [二叉树的坡度](./src/main/scala/io/github/dreamylost/Leetcode_563.scala)
* [根据二叉树创建字符串](./src/main/scala/io/github/dreamylost/Leetcode_606.scala)
* [两数之和 IV - 输入 BST](./src/main/scala/io/github/dreamylost/Leetcode_653.scala)
* [修剪二叉搜索树](./src/main/scala/io/github/dreamylost/Leetcode_669.scala)
* [二叉搜索树中的搜索](./src/main/scala/io/github/dreamylost/Leetcode_700.scala)
* [二叉搜索树节点最小距离](./src/main/scala/io/github/dreamylost/Leetcode_783.scala)
* [检查平衡性](./src/main/scala/io/github/dreamylost/Leetcode_Interview_0404.scala)
* [叶子相似的树](./src/main/scala/io/github/dreamylost/Leetcode_872.scala)
* [递增顺序查找树](./src/main/scala/io/github/dreamylost/Leetcode_897.scala)
* [单值二叉树](./src/main/scala/io/github/dreamylost/Leetcode_965.scala)
* [对称的二叉树](./src/main/scala/io/github/dreamylost/Leetcode_JZ_28.scala)
* [平衡二叉树](./src/main/scala/io/github/dreamylost/Leetcode_JZ_55_2.scala)
* [从根到叶的二进制数之和](./src/main/scala/io/github/dreamylost/Leetcode_1022.scala)
* [BiNode @unchecked](./src/main/scala/io/github/dreamylost/Leetcode_Interview_17_12.scala)
* [二叉树的中序遍历 迭代](./src/main/scala/io/github/dreamylost/Leetcode_94.scala)
* [不同的二叉搜索树 II](./src/main/scala/io/github/dreamylost/Leetcode_95.scala)
* [不同的二叉搜索树](./src/main/scala/io/github/dreamylost/Leetcode_96.scala)
* [验证二叉搜索树](./src/main/scala/io/github/dreamylost/Leetcode_98.scala)
* [二叉树的层序遍历](./src/main/scala/io/github/dreamylost/Leetcode_102.scala)
* [二叉树的锯齿形层次遍历](./src/main/scala/io/github/dreamylost/Leetcode_103.scala)
* [从前序与中序遍历序列构造二叉树](./src/main/scala/io/github/dreamylost/Leetcode_105.scala)
* [合法二叉搜索树](./src/main/scala/io/github/dreamylost/Leetcode_Interview_0405.scala)
* [从中序与后续遍历序列构造二叉树](./src/main/scala/io/github/dreamylost/Leetcode_106.scala)
* [路径总和 II](./src/main/scala/io/github/dreamylost/Leetcode_113.scala)
* [二叉树展开为链表](./src/main/scala/io/github/dreamylost/Leetcode_114.scala)
* [在二叉树中分配硬币](./src/main/scala/io/github/dreamylost/Leetcode_979.scala)
* [从叶结点开始的最小字符串](./src/main/scala/io/github/dreamylost/Leetcode_988.scala)
* [按垂序遍历返回其结点值](./src/main/scala/io/github/dreamylost/Leetcode_987.scala)
* [最大二叉树 II](./src/main/scala/io/github/dreamylost/Leetcode_998.scala)
* [先序遍历构造二叉树](./src/main/scala/io/github/dreamylost/Leetcode_1008.scala)
* [填充每个节点的下一个右侧节点指针](./src/main/scala/io/github/dreamylost/Leetcode_116.scala)
* [填充每个节点的下一个右侧节点指针 II](./src/main/scala/io/github/dreamylost/Leetcode_117.scala)
* [分裂二叉树的最大乘积](./src/main/scala/io/github/dreamylost/Leetcode_1339.scala)
* [求根到叶子节点数字之和](./src/main/scala/io/github/dreamylost/Leetcode_129.scala)
* [二叉树的前序遍历 迭代](./src/main/scala/io/github/dreamylost/Leetcode_129.scala)
* [二叉搜索树迭代器](./src/main/scala/io/github/dreamylost/Leetcode_173.scala)
* [二叉树最大宽度](./src/main/scala/io/github/dreamylost/Leetcode_662.scala)

## 链表

* [归并两个有序的链表](./src/main/scala/io/github/dreamylost/Leetcode_21_ListNode.scala)
* [从有序链表中删除重复节点](./src/main/scala/io/github/dreamylost/Leetcode_83_ListNode.scala)
* [相交链表](./src/main/scala/io/github/dreamylost/Leetcode_160_ListNode.scala)
* [链表反转](./src/main/scala/io/github/dreamylost/Leetcode_206_ListNode.scala)

## 其他

* [爬楼梯](./src/main/scala/io/github/dreamylost/Leetcode_70.scala)
* [最大面值（LintCode 669）](./src/main/scala/io/github/dreamylost/CoinChange.scala)
* [比特位计数](./src/main/scala/io/github/dreamylost/CountBits.scala)
* [打家劫舍](./src/main/scala/io/github/dreamylost/Leetcdoe_198.scala)
* [反转数字](./src/main/scala/io/github/dreamylost/Leetcode_7.scala)
* [求S中符合J的元素的个数](./src/main/scala/io/github/dreamylost/Leetcode_771.scala)
* [IP 地址无效化](./src/main/scala/io/github/dreamylost/Leetcode_1108.scala)  
* [访问所有点的最小时间](./src/main/scala/io/github/dreamylost/Leetcode_1266.scala)  
* [整数的各位积和之差](./src/main/scala/io/github/dreamylost/Leetcode_1281.scala)
* [统计位数为偶数的数字](./src/main/scala/io/github/dreamylost/Leetcode_1295.scala)  
* [将每个元素替换为右侧最大元素](./src/main/scala/io/github/dreamylost/Leetcode_1299.scala)  
* [统计有序矩阵中的负数](./src/main/scala/io/github/dreamylost/Leetcode_1351.scala)  
* [两数之和](./src/main/scala/io/github/dreamylost/Leetcode_1_Array.scala)  
* [两数相加](./src/main/scala/io/github/dreamylost/Leetcode_2_ListNode.scala)  
* [删除排序数组中的重复项II](./src/main/scala/io/github/dreamylost/Leetcode_80_Array.scala)
* [搜索二维矩阵II](./src/main/scala/io/github/dreamylost/Leetcode_240_Array.scala)
* [找出数组中重复的数](./src/main/scala/io/github/dreamylost/Leetcode_287_Array.scala)
* [有序矩阵的 Kth Element](./src/main/scala/io/github/dreamylost/Leetcode_378_Array.scala)
* [嵌套数组](./src/main/scala/io/github/dreamylost/Leetcode_565_Array.scala)
* [数组相邻差值的个数](./src/main/scala/io/github/dreamylost/Leetcode_667_Array.scala)
* [数组的度](./src/main/scala/io/github/dreamylost/Leetcode_697_Array.scala)
* [对角元素相等的矩阵](./src/main/scala/io/github/dreamylost/Leetcode_766_Array.scala)
* [最多能完成排序的块](./src/main/scala/io/github/dreamylost/Leetcode_769_Array.scala)  
* [猜数字](./src/main/scala/io/github/dreamylost/Leetcode_LCP_1_1.scala)
* [股票的最大利润](./src/main/scala/io/github/dreamylost/Leetcode_121.scala)
* [子数组之和的最大值](./src/main/scala/io/github/dreamylost/Leetcode_53.scala)
* [使用最小花费爬楼梯](./src/main/scala/io/github/dreamylost/Leetcode_746.scala)  
* [最短路径](./src/main/scala/io/github/dreamylost/Leetcode_64.scala)
* [区域和检索](./src/main/scala/io/github/dreamylost/NumArray.scala)
* [机器人能否返回原点](./src/main/scala/io/github/dreamylost/Leetcode_657.scala)