package
Version:
v0.0.0-...-c500841
Opens a new window with list of versions in this module.
Published: Aug 16, 2025
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type FixFunc[T cmp.Ordered] func(*rbNode[T]) *rbNode[T]
FixFunc 修复红黑树的函数定义
RBTree 红黑树
func (rb *RBTree[T]) Find(val T) *rbNode[T]
Find 查找
IsValid 验证红黑树所有性质:
1. 根节点为黑色
2. 红色节点不能连续出现
3. 所有路径黑高一致
4. 叶子节点(NIL)视为黑色
Source Files
¶
Click to show internal directories.
Click to hide internal directories.