Update avl_tree
This commit is contained in:
parent
70dead5cd0
commit
b39b84acba
@ -9,7 +9,7 @@ using NUnit.Framework;
|
|||||||
|
|
||||||
namespace hello_algo.chapter_tree
|
namespace hello_algo.chapter_tree
|
||||||
{
|
{
|
||||||
// Tree class
|
/* AVL 树 */
|
||||||
class AVLTree
|
class AVLTree
|
||||||
{
|
{
|
||||||
public TreeNode? root; // 根节点
|
public TreeNode? root; // 根节点
|
||||||
|
@ -6,7 +6,7 @@ package chapter_tree
|
|||||||
|
|
||||||
import . "github.com/krahets/hello-algo/pkg"
|
import . "github.com/krahets/hello-algo/pkg"
|
||||||
|
|
||||||
/* AVL Tree*/
|
/* AVL 树 */
|
||||||
type avlTree struct {
|
type avlTree struct {
|
||||||
// 根节点
|
// 根节点
|
||||||
root *TreeNode
|
root *TreeNode
|
||||||
|
@ -8,7 +8,7 @@ package chapter_tree;
|
|||||||
|
|
||||||
import include.*;
|
import include.*;
|
||||||
|
|
||||||
// Tree class
|
/* AVL 树 */
|
||||||
class AVLTree {
|
class AVLTree {
|
||||||
TreeNode root; // 根节点
|
TreeNode root; // 根节点
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
// Tree class
|
/* AVL 树 */
|
||||||
class AVLTree {
|
class AVLTree {
|
||||||
fileprivate var root: TreeNode? // 根节点
|
fileprivate var root: TreeNode? // 根节点
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const inc = @import("include");
|
const inc = @import("include");
|
||||||
|
|
||||||
// 平衡二叉树
|
// AVL 树
|
||||||
pub fn AVLTree(comptime T: type) type {
|
pub fn AVLTree(comptime T: type) type {
|
||||||
return struct {
|
return struct {
|
||||||
const Self = @This();
|
const Self = @This();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user