diff --git "a/AVL\346\240\221/.gitignore" "b/AVL\346\240\221/.gitignore"
deleted file mode 100644
index 173454b..0000000
--- "a/AVL\346\240\221/.gitignore"
+++ /dev/null
@@ -1,9 +0,0 @@
-# Created by .ignore support plugin (hsz.mobi)
-### Example user template template
-### Example user template
-
-# IntelliJ project files
-.idea
-*.iml
-out
-gen
diff --git "a/AVL\346\240\221/.idea/vcs.xml" "b/AVL\346\240\221/.idea/vcs.xml"
deleted file mode 100644
index 6c0b863..0000000
--- "a/AVL\346\240\221/.idea/vcs.xml"
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git "a/AVL\346\240\221/src/com/xhp281/file/Files.java" "b/AVL\346\240\221/src/com/xhp281/file/Files.java"
deleted file mode 100644
index 393faf5..0000000
--- "a/AVL\346\240\221/src/com/xhp281/file/Files.java"
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.xhp281.file;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-
-/**
- * User: FenDou
- * Date: 2019-05-20 11:47
- * Description:
- */
-
-public class Files {
- public static void writeToFile(String filePath, Object data) {
- writeToFile(filePath, data, false);
- }
-
- public static void writeToFile(String filePath, Object data, boolean append) {
- if (filePath == null || data == null) return;
-
- try {
- File file = new File(filePath);
- if (!file.exists()) {
- file.getParentFile().mkdirs();
- file.createNewFile();
- }
-
- try (FileWriter writer = new FileWriter(file, append);
- BufferedWriter out = new BufferedWriter(writer) ) {
- out.write(data.toString());
- out.flush();
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git "a/AVL\346\240\221/src/com/xhp281/printer/BinaryTreeInfo.java" "b/AVL\346\240\221/src/com/xhp281/printer/BinaryTreeInfo.java"
deleted file mode 100755
index 25ce322..0000000
--- "a/AVL\346\240\221/src/com/xhp281/printer/BinaryTreeInfo.java"
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.xhp281.printer;
-
-public interface BinaryTreeInfo {
- /**
- * who is the root node
- */
- Object root();
- /**
- * how to get the left child of the node
- */
- Object left(Object node);
- /**
- * how to get the right child of the node
- */
- Object right(Object node);
- /**
- * how to print the node
- */
- Object string(Object node);
-}
diff --git "a/AVL\346\240\221/src/com/xhp281/printer/BinaryTrees.java" "b/AVL\346\240\221/src/com/xhp281/printer/BinaryTrees.java"
deleted file mode 100755
index 1f0d6f5..0000000
--- "a/AVL\346\240\221/src/com/xhp281/printer/BinaryTrees.java"
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.xhp281.printer;
-
-/**
- *
- * @author MJ Lee
- *
- */
-public final class BinaryTrees {
-
- private BinaryTrees() {
- }
-
- public static void print(BinaryTreeInfo tree) {
- print(tree, null);
- }
-
- public static void println(BinaryTreeInfo tree) {
- println(tree, null);
- }
-
- public static void print(BinaryTreeInfo tree, PrintStyle style) {
- if (tree == null || tree.root() == null) return;
- printer(tree, style).print();
- }
-
- public static void println(BinaryTreeInfo tree, PrintStyle style) {
- if (tree == null || tree.root() == null) return;
- printer(tree, style).println();
- }
-
- public static String printString(BinaryTreeInfo tree) {
- return printString(tree, null);
- }
-
- public static String printString(BinaryTreeInfo tree, PrintStyle style) {
- if (tree == null || tree.root() == null) return null;
- return printer(tree, style).printString();
- }
-
- private static Printer printer(BinaryTreeInfo tree, PrintStyle style) {
- if (style == PrintStyle.INORDER) return new InorderPrinter(tree);
- return new LevelOrderPrinter(tree);
- }
-
- public enum PrintStyle {
- LEVEL_ORDER, INORDER
- }
-}
\ No newline at end of file
diff --git "a/AVL\346\240\221/src/com/xhp281/printer/InorderPrinter.java" "b/AVL\346\240\221/src/com/xhp281/printer/InorderPrinter.java"
deleted file mode 100755
index f26d136..0000000
--- "a/AVL\346\240\221/src/com/xhp281/printer/InorderPrinter.java"
+++ /dev/null
@@ -1,89 +0,0 @@
-package com.xhp281.printer;
-
-/**
-
- ┌──800
- ┌──760
- │ └──600
- ┌──540
- │ └──476
- │ └──445
- ┌──410
- │ └──394
-381
- │ ┌──190
- │ │ └──146
- │ ┌──40
- │ │ └──35
- └──12
- └──9
-
- * @author MJ Lee
- *
- */
-public class InorderPrinter extends Printer {
- private static String rightAppend;
- private static String leftAppend;
- private static String blankAppend;
- private static String lineAppend;
- static {
- int length = 2;
- rightAppend = "┌" + Strings.repeat("─", length);
- leftAppend = "└" + Strings.repeat("─", length);
- blankAppend = Strings.blank(length + 1);
- lineAppend = "│" + Strings.blank(length);
- }
-
- public InorderPrinter(BinaryTreeInfo tree) {
- super(tree);
- }
-
- @Override
- public String printString() {
- StringBuilder string = new StringBuilder(
- printString(tree.root(), "", "", ""));
- string.deleteCharAt(string.length() - 1);
- return string.toString();
- }
-
- /**
- * 生成node节点的字符串
- * @param nodePrefix node那一行的前缀字符串
- * @param leftPrefix node整棵左子树的前缀字符串
- * @param rightPrefix node整棵右子树的前缀字符串
- * @return
- */
- private String printString(
- Object node,
- String nodePrefix,
- String leftPrefix,
- String rightPrefix) {
- Object left = tree.left(node);
- Object right = tree.right(node);
- String string = tree.string(node).toString();
-
- int length = string.length();
- if (length % 2 == 0) {
- length--;
- }
- length >>= 1;
-
- String nodeString = "";
- if (right != null) {
- rightPrefix += Strings.blank(length);
- nodeString += printString(right,
- rightPrefix + rightAppend,
- rightPrefix + lineAppend,
- rightPrefix + blankAppend);
- }
- nodeString += nodePrefix + string + "\n";
- if (left != null) {
- leftPrefix += Strings.blank(length);
- nodeString += printString(left,
- leftPrefix + leftAppend,
- leftPrefix + blankAppend,
- leftPrefix + lineAppend);
- }
- return nodeString;
- }
-}
diff --git "a/AVL\346\240\221/src/com/xhp281/printer/LevelOrderPrinter.java" "b/AVL\346\240\221/src/com/xhp281/printer/LevelOrderPrinter.java"
deleted file mode 100755
index e994e9f..0000000
--- "a/AVL\346\240\221/src/com/xhp281/printer/LevelOrderPrinter.java"
+++ /dev/null
@@ -1,528 +0,0 @@
-package com.xhp281.printer;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Queue;
-
-/**
-
- ┌───381────┐
- │ │
-┌─12─┐ ┌─410─┐
-│ │ │ │
-9 ┌─40─┐ 394 ┌─540─┐
- │ │ │ │
- 35 ┌─190 ┌─476 ┌─760─┐
- │ │ │ │
- 146 445 600 800
-
- * @author MJ Lee
- *
- */
-public class LevelOrderPrinter extends Printer {
- /**
- * 节点之间允许的最小间距(最小只能填1)
- */
- private static final int MIN_SPACE = 1;
- private Node root;
- private int minX;
- private int maxWidth;
-
- public LevelOrderPrinter(BinaryTreeInfo tree) {
- super(tree);
-
- root = new Node(tree.root(), tree);
- maxWidth = root.width;
- }
-
- @Override
- public String printString() {
- // nodes用来存放所有的节点
- List> nodes = new ArrayList<>();
- fillNodes(nodes);
- cleanNodes(nodes);
- compressNodes(nodes);
- addLineNodes(nodes);
-
- int rowCount = nodes.size();
-
- // 构建字符串
- StringBuilder string = new StringBuilder();
- for (int i = 0; i < rowCount; i++) {
- if (i != 0) {
- string.append("\n");
- }
-
- List rowNodes = nodes.get(i);
- StringBuilder rowSb = new StringBuilder();
- for (Node node : rowNodes) {
- int leftSpace = node.x - rowSb.length() - minX;
- rowSb.append(Strings.blank(leftSpace));
- rowSb.append(node.string);
- }
-
- string.append(rowSb);
- }
-
- return string.toString();
- }
-
- /**
- * 添加一个元素节点
- */
- private Node addNode(List nodes, Object btNode) {
- Node node = null;
- if (btNode != null) {
- node = new Node(btNode, tree);
- maxWidth = Math.max(maxWidth, node.width);
- nodes.add(node);
- } else {
- nodes.add(null);
- }
- return node;
- }
-
- /**
- * 以满二叉树的形式填充节点
- */
- private void fillNodes(List> nodes) {
- if (nodes == null) return;
- // 第一行
- List firstRowNodes = new ArrayList<>();
- firstRowNodes.add(root);
- nodes.add(firstRowNodes);
-
- // 其他行
- while (true) {
- List preRowNodes = nodes.get(nodes.size() - 1);
- List rowNodes = new ArrayList<>();
-
- boolean notNull = false;
- for (Node node : preRowNodes) {
- if (node == null) {
- rowNodes.add(null);
- rowNodes.add(null);
- } else {
- Node left = addNode(rowNodes, tree.left(node.btNode));
- if (left != null) {
- node.left = left;
- left.parent = node;
- notNull = true;
- }
-
- Node right = addNode(rowNodes, tree.right(node.btNode));
- if (right != null) {
- node.right = right;
- right.parent = node;
- notNull = true;
- }
- }
- }
-
- // 全是null,就退出
- if (!notNull) break;
- nodes.add(rowNodes);
- }
- }
-
- /**
- * 删除全部null、更新节点的坐标
- */
- private void cleanNodes(List> nodes) {
- if (nodes == null) return;
-
- int rowCount = nodes.size();
- if (rowCount < 2) return;
-
- // 最后一行的节点数量
- int lastRowNodeCount = nodes.get(rowCount - 1).size();
-
- // 每个节点之间的间距
- int nodeSpace = maxWidth + 2;
-
- // 最后一行的长度
- int lastRowLength = lastRowNodeCount * maxWidth
- + nodeSpace * (lastRowNodeCount - 1);
-
- // 空集合
- Collection