• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 21 páginas
Notas de lectura

Data structure & algorithms (AVL Tree notes)

Document preview thumbnail
Vista previa 3 fuera de 21 páginas

This document is a concise guide to AVL Trees, a type of self-balancing binary search tree. It covers all the key concepts and explains the various rotation operations required to maintain balance, including left rotation, right rotation, left-right rotation, and right-left rotation. The document also discusses the advantages and disadvantages of AVL trees, as well as their practical applications. Key operations like insertion, deletion, and searching are also detailed, and the document may include relevant C++ files. This is a great resource for students looking to understand balanced trees.

Vista previa del contenido

Data Structures and Algorithm
(CC-2042)
Lecture 25
E N G R. D R B I L A L A S H FA Q A H M E D
S C H O O L O F S Y S T E M S A N D T E C H N O LO GY ( S S T )
C O M P U T E R S C I E N C E FA C U LT Y

, AVL Tree
 An AVL Tree is a Self-Balancing
Binary Search Tree (BST) wher
 the height difference (or balan
factor) between the left and ri
subtrees of any node is at mos
 Named after its inventors Adel
Velsky and Landis.
 Ensures all operations like sea
insertion, and deletion are 𝑂(l
where 𝑛 is the number of node



09/06/2025 DS

, Key Concepts
1. Balance Factor:
Balance Factor = Height of Left Subtree - Height of Right Subtree.
For any node:
 Balance Factor =−1,0,or 1 : The tree is balanced.
 Balance Factor <−1 or >1 : The tree is unbalanced.

2. Rotations:
To rebalance the tree, rotations are performed:
 Left Rotation (LL Case): Right-heavy tree.
 Right Rotation (RR Case): Left-heavy tree.
 Left-Right Rotation (LR Case): Left subtree of the right child is
heavy.
 Right-Left Rotation (RL Case): Right subtree of the left child is
heavy.

09/06/2025 DS

Información del documento

Subido en
6 de septiembre de 2025
Número de páginas
21
Escrito en
2024/2025
Tipo
Notas de lectura
Profesor(es)
Dr.bilal ashfaq
Contiene
Class 9
$10.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
1
Artículos
19
Última venta
-




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes