Binary Search Tree

 Binary tree adalah struktur data non linier bentuk khusus dari pohon umum (general tree) yang diilhami dari pohon yang kita lihat sehari-hari. Namun, karena ini merupakan pohon imajiner maka bentuknya bisa dibolak-balik sesuai yang kita inginkan.


 Pohon umum di gambar 1 memiliki 7 simpul (7 nodes), yaitu A, B, C, D, E, F, dan G. Setiap simpul bisa memiliki hubungan dengan 0, 1, 2, 3, atau berapapun simpul lain. Yang dikatakan hubungan adalah garis yang menghubungkan simpul tersebut dengan simpul-simpul di bawahnya. Karena ketidakpastian banyaknya simpul yang dapat berhubungan dengan simpul lain, maka akan menimbulkan kesulitan jika akan dilakukan komputerisasinya. Kalau masing-masing dipatok (default) dengan penyediaan sebanyak 5 hubungan dari masing-masing simpul, maka, jika akhirnya hanya digunakan 1 sampai 3 saja, berakibat terjadinya pemborosan penggunaan memori. Sebaliknya, jika hanya disediakan 3 hubungan dari setiap simpul tetapi pada akhirnya banyak yang memiliki hubungan dengan lebih dari 3 simpul lain, maka akan terjadi loosing data.

Gambar 1

Operasi dalam binary tree : 
  1. insert(data)
  2. inOrderTraverse()
  3. preOrderTraverse()
  4. postOrderTraverse()
  5. search(data)
  6. remove(data)






Link




Share this

Related Posts

Previous
Next Post »

28 komentar

komentar
June 8, 2021 at 9:34 PM delete

Nama: Julio Geraldi Soeiono
NRP: 5025201079
Link: https://juliogeraldigg.blogspot.com/2021/06/binary-search-tree-pada-java.html

Reply
avatar
June 8, 2021 at 9:42 PM delete

Nama : Cahyadi Surya Nugraha
NRP : 5025201184
Link : https://cahyadisuryanugraha.blogspot.com/2021/06/binary-search-tree.html

Reply
avatar
June 8, 2021 at 9:59 PM delete

Nama : Haniif Ahmad Jauhari
NRP : 5025201224
Link : https://haniifahmadjauhari.blogspot.com/2021/06/tugas-struktur-data-9-juni-2021.html

Reply
avatar
June 8, 2021 at 10:01 PM delete

Nama: Ferdinand Putra Gumilang Silalahi
NRP : 5025201176
Link: https://gumilangsilalahi.blogspot.com/2021/06/bst.html

Reply
avatar
June 8, 2021 at 10:05 PM delete

Nama : Sarah Alissa Putri
NRP : 5025201272
Link : https://sharrju.blogspot.com/2021/06/struktur-data-implementasi-bst-java.html

Reply
avatar
June 8, 2021 at 10:21 PM delete

Nama : Mohammad Nouval Bachrezi
NRP : 5025201030
Link : https://mohammadnouvalbachrezi.blogspot.com/2021/06/binary-search-tree-09062021-binary.html

Reply
avatar
June 8, 2021 at 10:24 PM delete

Nama : Afira Rolobessy
NRP : 5025201006
LINK : https://afira03.blogspot.com/2021/06/binary-search-tree.html

Reply
avatar
June 8, 2021 at 10:50 PM delete

Nama : Samuel Berkat Hulu
NRP : 5025201055
Link : https://samuelberkathulu.blogspot.com/2021/06/tugas-struktur-data-binary-search-tree.html

Reply
avatar
June 8, 2021 at 10:58 PM delete

Nama : Muhammad Andi Akbar Ramadhan
NRP : 5025201264
Link : https://andiakbar264.blogspot.com/2021/06/binary-search-tree.html

Reply
avatar
June 8, 2021 at 11:28 PM delete

Nama : Zidan Al Azizi
NRP : 5025201014
LINK : https://zidanalazizi27.blogspot.com/2021/06/implementasi-binary-search-tree.html

Reply
avatar
June 9, 2021 at 12:08 AM delete

Nama : Ahmad Ibnu Malik Rahman
NRP : 5025201232
Link : https://ibnumalik12.blogspot.com/2021/06/binary-search-tree-bst-in-java.html

Reply
avatar
June 9, 2021 at 12:48 AM delete

Nama : Sidrotul Munawaroh
NRP : 5025201047
Link : https://sidrotulmunawaroh.blogspot.com/2021/06/binary-search-tree.html

Reply
avatar
June 9, 2021 at 12:59 AM delete

Nama : Frederick Wijayadi Susilo
NRP : 5025201111
Link : https://frederickws.blogspot.com/2021/06/implementasi-binary-search-tree-bst.html

Reply
avatar
June 9, 2021 at 1:13 AM delete

Nama : Nabila Zakiyah Khansa' Machrus
NRP : 5025201139
Link : https://nabilayasha.blogspot.com/2021/06/binary-search-tree.html

Reply
avatar
June 9, 2021 at 5:35 AM delete

Nama: Mohammad Fadhil Rasyidin Parinduri
NRP: 5025201131
Link: Binary Search Tree in Java

Reply
avatar
June 9, 2021 at 6:19 AM delete

Nama : Afiq Akram
NRP : 5025201270
Link : https://afiqakraam.blogspot.com/2021/06/implementasi-binary-search-tree.html

Reply
avatar
June 9, 2021 at 6:48 AM delete

Nama: Adelia Hasna Surya Putri
NRP: 5025201200
Link: https://adeliahasnasp.blogspot.com/2021/06/penugasan-8-bst.html

Reply
avatar
June 9, 2021 at 6:59 AM delete

Nama : Joy Posma Abednego Gultom
NRP : 5025201103
Link : https://joygoeltom.blogspot.com/2021/06/binary-search-tree.html

Reply
avatar
June 9, 2021 at 9:49 AM delete

Nama : Ilma Fahma Syadidah
NRP : 5025201063
Link : https://ilmafsy.blogspot.com/2021/06/tugas-binary-search-tree.html

Reply
avatar
June 15, 2021 at 3:07 AM delete

Nama : Bagus Febrian Dali Hidayat
NRP : 5025201208
Link : https://bagusfebrian25.blogspot.com/2021/06/binary-search-tree.html

Reply
avatar
June 15, 2021 at 7:49 AM delete

Nama : Rafael Asi Kristanto Tambunan
NRP : 5025201168
Link : https://rafaelaktambunan.blogspot.com/2021/06/binary-search-tree.html

Reply
avatar
June 15, 2021 at 11:38 AM delete

Nama : Angela Oryza Prabowo
NRP : 5025201022
Link : https://angelaoryza.blogspot.com/2021/06/binary-search-tree.html

Reply
avatar
June 15, 2021 at 4:21 PM delete

Nama : Helmi Taqiyudin
NRP : 5025201152
Link : https://helmitaqiyudin.blogspot.com/2021/06/implementasi-binary-search-tree.html

Reply
avatar