• ¿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 23 páginas
Notas de lectura

Data structure & algorithms (Binary Search Tree (BST)notes)

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

This document provides a concise yet comprehensive overview of Binary Search Trees (BST). It covers essential topics such as key operations like insertion, deletion, searching, and traversal. The document also discusses the advantages and disadvantages of BSTs, as well as the important distinction between balanced and unbalanced BSTs. It includes a comparison with other data structures and a section on self-balancing trees. This resource is perfect for students looking to understand the fundamentals of BSTs.

Vista previa del contenido

Data Structures and Algorithm
(CC-2042)
Lecture 23
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

, Binary Search
Tree (BST)
 A Binary Search Tree (BST) is a
specialized binary tree where:
1. Each node has at most two chil
left and right.
2. The left subtree of a node cont
nodes with values less than the
node’s value.
3. The right subtree of a node con
nodes with values greater than
node’s value.
4. Both left and right subtrees are
BSTs.




09/06/2025 DS

, Applications of Binary Search
Tree (BST):
 A Self-Balancing Binary Search Tree is used to maintain sorted stream of data.
 A Self-Balancing Binary Search Tree is used to implement doubly ended priorit
queue.
 There are many more algorithm problems where a Self-Balancing BST is the b
suited data structure, like count smaller elements on right, Smallest Greater
Element on Right Side, etc.
 A BST can be used to sort a large dataset. By inserting the elements of the
dataset into a BST and then performing an in-order traversal, the elements wi
be returned in sorted order.
 Variations of BST like B Tree and B+ Tree are used in Database indexing.
 TreeMap and TreeSet in Java, and set and map in C++ are internally
implemented using self-balancing BSTs, more formally a Red-Black Tree.



09/06/2025 DS

Información del documento

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

¿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