此存储库包含我的一些常用算法的解决方案。我已创建此存储库以了解算法并改进解决不同的常见计算机科学问题。如果我有时间,我会尝试添加更多解决方案:)
每个解决的问题都有一个用Java编写的程序。每个解决方案都经过测试,一些问题包含多个具有不同实现的解决方案。
您可以检查在test目录中执行测试的解决方案。使用TDD解决了一些问题。
- 按层遍历二叉树
- 先序遍历二叉树
- 中序遍历二叉树
- 后序遍历二叉树
- 二叉树相等?
- 判断二叉搜索树
- 二叉树深度
- 最低的共同祖先
- 将数组排序为BST
- AVL树中位数
- 路径计算器
- 每片叶子的路径
- 判断平衡树
- 按层生成包含节点的列表
- Pedro Vicente Gómez Sánchez - [email protected]
Copyright 2014 Pedro Vicente Gómez Sánchez
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.