Skip to content

Algorithms-and-Data-Structures-2021/classwork-four-binary-search-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binary Search Tree

Operations

  1. Insert(key) - inserts a new node intro the binary tree.
  2. Remove(key) - removes existing node from the binary tree.
  3. Search(key) - searches for the node with a specified key value.
  4. Traverse(algorithm) - traverses a binary tree using an algorithm (In-order, Pre-order, Post-order, BFS, DFS).

Tasks

  1. (0.5 баллов) Даны два дерева t1 и t2. Получить список общих уникальных ключей двух деревьев.
  2. (0.5 баллов) Переписать реализацию BST-дерева, чтобы оно хранило пару ключ-значение (key: int, value: string).
  3. (0.5 баллов) Перепишите рекурсивные реализации поиска и добавления на итеративные.
  4. (1 балл) Реализуйте метод BinarySearchTree::Remove(key).

About

Двоичное дерево поиска и алгоритмы обхода узлов

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published