Future Design



Download 1,46 Mb.
bet1/2
Sana16.06.2022
Hajmi1,46 Mb.
#677142
  1   2
Bog'liq
RUFAT 5

Future Design

Performed by: QULMURODOV RUFAT

History

History

The binary search tree algorithm was discovered independently by several researchers, including P.F. Windley, Andrew Donald Booth, Andrew Colin, Thomas N. Hibbard.[1][2] The algorithm is attributed to Conway Berners-Lee and David Wheeler, who used it for storing storing labeled data in magnetic tapes in 1960.[3]

One of the earliest and popular binary search tree algorithm is that of Hibbard.

Overview

Overview

A binary search tree is a rooted binary tree in which the nodes are arrenged in total order in which the nodes with keys greater than any particular node is stored on the right sub-trees and the ones with equal to or less than are stored on the left sub-tree satisfying the binary search property

Binary search trees are also efficacious in sortings and search algorithms. However, the search complexity of a BST depends upon the order in which the nodes are inserted and deleted; since in worst case, successive operations in the binary search tree may lead to degeneracy and form a singly linked list (or "unbalanced tree") like structure, thus has the same worst-case complexity as a linked list.[

Binary search trees are also a fundamental data structure used in construction of abstract data structures such as sets, multisets, and associative arrays.

Recursive search


The following pseudocode implements the BST search procedure through recursion
Recursive-Tree-Search(x, key)
if x = NIL or key = x.key then
return x
if key < x.key then
return Tree-Search(x.left, key)
else
return Tree-Search(x.right, key)
end if
The recursive procedure continues until a or the being searched for are encountered.

Successor and predecessor


For certain operations, given a node
, finding the successor or predecessor of
is crucial. Assuming all the keys of the BST are distinct, the successor of a node
in BST is the node with the smallest key greater than
's key. On the other hand, the predecessor of a node
in BST is the node with the largest key smaller than
's key. Following is pseudocode for finding the successor and predecessor of a node in BST.

Tree-Successor(x)

Download 1,46 Mb.

Do'stlaringiz bilan baham:
  1   2




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish