cs3460_ch4_avl_tree 美国高校《数据结构》(Data Structure),共9章 节 ,英文版.pptVIP

  • 4
  • 0
  • 约小于1千字
  • 约 14页
  • 2018-05-21 发布于天津
  • 举报

cs3460_ch4_avl_tree 美国高校《数据结构》(Data Structure),共9章 节 ,英文版.ppt

cs3460_ch4_avl_tree 美国高校《数据结构》(Data Structure),共9章 节 ,英文版.ppt

AVL Trees;AVL Property – Height Balance;Group Work;Single Rotation - 1;Single Rotation - 2;Why we need double rotations;A double rotation is a sequence of two single rotations Perform a rotation to the right about k1 Then perform a rotation to the left about k3 This is called a “right-left” double rotation The double rotation is about the base node k3 The key is to recognize the pattern of k3, k2, k1 ( A k3 ( ( B k2 C ) k1 D ) = ( ( A k3 B ) k2 ( C k1 D ) ) ;This double rotation is a sequence of two single rotations Perform a rotation to the left about k1 Then perform a rotation to the right

文档评论(0)

1亿VIP精品文档

相关文档