AVL树中是否有左,右,右,右旋转以进行平衡?
Is there a Left,Right,Right,Right rotation in AVL tree for balancing?
我有以下键(字符串类型)。它们按顺序一次插入一个,
know->world->state->agent->estimate->figure->compute->symbols->bayes->model
我在添加数字时卡住了。我已经包括 "string[balancing factor]"
如果我做错了什么,有人可以指导我吗?
state[2]
/\
/ \
/ \
estimate[-1] world[0]
/\
/ \
/ \
agent[0] know[1]
/
/
figure[0]
你的树结构看起来不错。你只需要执行旋转以使其平衡。
作为参考,this website 应该可以帮助您可视化 AVL 树中的插入和删除
我有以下键(字符串类型)。它们按顺序一次插入一个,
know->world->state->agent->estimate->figure->compute->symbols->bayes->model
我在添加数字时卡住了。我已经包括 "string[balancing factor]" 如果我做错了什么,有人可以指导我吗?
state[2]
/\
/ \
/ \
estimate[-1] world[0]
/\
/ \
/ \
agent[0] know[1]
/
/
figure[0]
你的树结构看起来不错。你只需要执行旋转以使其平衡。
作为参考,this website 应该可以帮助您可视化 AVL 树中的插入和删除