上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 198 下一页
摘要: package graph.fenzhi; public class Divide { public static void main(String[] args) { System.out.println("汉诺塔"); char a,b,c; a = 'A'; b = 'B'; c = 'C'; 阅读全文
posted @ 2021-08-17 09:27 brady-wang 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 10,11,7,6,8,9 package tree.bst.avl; public class AVLTreeDemo { public static void main(String[] args) { //int[] arr = {4,3,6,5,7,8}; //int[] arr = {10 阅读全文
posted @ 2021-08-16 16:29 brady-wang 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 左旋——自己变为右孩子的左孩子;右旋——自己变为左孩子的右孩子; 以上口诀+动图=完美 高度平衡的搜索二叉树 一棵平衡树,或是空树,或是具有以下性质的二叉搜索树:左子树和右子树都是AVL树,且左右子树的高度之差的绝对值不超过1。 平衡化旋转 AVL树相较于普通的二叉搜索树,自主要的就是做了平衡化处理 阅读全文
posted @ 2021-08-16 15:28 brady-wang 阅读(609) 评论(0) 推荐(0) 编辑
摘要: package tree.bst.avl; public class AVLTreeDemo { public static void main(String[] args) { int[] arr = {4,3,6,5,7,8}; AvlTree avlTree = new AvlTree(); 阅读全文
posted @ 2021-08-16 13:52 brady-wang 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 删除叶子节点 删除只有一个的子节点的 删除有两个子节点的 package tree.bst; public class bstDemo { public static void main(String[] args) { System.out.println("二叉排序树"); BstTree bs 阅读全文
posted @ 2021-08-16 11:39 brady-wang 阅读(84) 评论(0) 推荐(0) 编辑
摘要: package tree.bst; public class bstDemo { public static void main(String[] args) { System.out.println("二叉排序树"); BstTree bstTree = new BstTree(); int[] 阅读全文
posted @ 2021-08-16 10:54 brady-wang 阅读(108) 评论(0) 推荐(0) 编辑
摘要: package jiegou.bst; import sun.font.GlyphLayout; import sun.nio.cs.ext.TIS_620; // 二叉排序树 public class BinarySortTreeDemo { public static void main(Str 阅读全文
posted @ 2021-08-15 17:45 brady-wang 阅读(43) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/730162/202108/730162-20210815133914511-284628638.png) 阅读全文
posted @ 2021-08-15 15:02 brady-wang 阅读(17) 评论(0) 推荐(0) 编辑
摘要: package jiegou.tree; import jdk.packager.services.userjvmoptions.PreferencesUserJvmOptions; import java.util.ArrayList; public class ArrayTreeDemo { p 阅读全文
posted @ 2021-08-15 13:23 brady-wang 阅读(31) 评论(0) 推荐(0) 编辑
摘要: package jiegou.tree; public class BinaryTreeDemo { public static void main(String[] args) { // 先创建一颗二叉树 BinaryTree binaryTree = new BinaryTree(); Hero 阅读全文
posted @ 2021-08-15 12:37 brady-wang 阅读(85) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 198 下一页