Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 3.39 KB

binary_search_tree.md

File metadata and controls

33 lines (21 loc) · 3.39 KB

Binary Search Tree

Principe

Un Binary Search Tree (BST) ou un Arbre Binaire de Recherche (ABR) est une structure de données qui organise des éléments de manière hiérarchique.

Chaque élément a au plus deux enfants, les éléments appartenant au sous-arbre gauche sont inférieurs et les éléments du sous-arbre droit sont supérieurs.

Cette disposition permet de rechercher, insérer et supprimer efficacement des éléments dans l'arbre.

Les 3 opérations principales ont une complexité temporelle de O(log n) en moyenne et dans le pire des cas O(n).

Exemple d'un arbre binaire de recherche:

Facile

Label Tags Date
703. Kth Largest Element in a Stream Tree, Design, Binary Search Tree, Heap (Priority Queue), Binary Tree, Data Stream 27-04-2024

Moyen

Label Tags Date
538. Convert BST to Greater Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree 25-06-2024
1038. Binary Search Tree to Greater Sum Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree 25-06-2024
1382. Balance a Binary Search Tree Divide and Conquer, Greedy, Tree, Depth-First Search, Binary Search Tree, Binary Tree 26-06-2024

Difficile

Label Tags Date