Skip to main content

AVL Tree

Pertemuan ke-(?),  AVL Tree 
Materi :
- Konsep AVL TREE
- Konsep-konsep Search, Insertion dan Deletion


AVL TREE
AVL Tree adalah sebuah "Binary Search Tree tahap berikut", dengan kata lain, AVL Tree adalah pematangan  dari konsep Binary Search Tree. AVL Tree dalam penempatan datanya akan terlihat persis sama seperti Binary Tree, namun pada saat penempatan data, AVL Tree melakukan langkah merapikan pohon, yang tidak dilakukan pada Binary Tree, sehingga data lebih efisien di AVL Tree. AVL Tree memiliki perbedaan tinggi maksimal 1 antara subtree kiri dan subtree kanan, bila perbedaan tinggi melewati 1, artinya sudah tidak seimbang dan akan dilakukan penyeimbangan. Hal ini dilakukan untuk mencegah sebuah situasi yang tidak baik yang bisa terjadi pada Binary Tree yaitu Skewed Tree.
 




















AVL TREE : INSERTION
Insertion pada AVL Tree sama seperti Binary Tree (Apabila lebih besar ke kanan, lebih kecil ke kiri) kecuali AVL Tree memiliki Balance(Untuk mencegah Skewed Tree). Balance ini akan di sesudah insertion biasa seperti Binary Tree dilakukan. Bila tidak balance, akan diperbaiki agar balance.

Balance tersebut diperbaiki dengan teknik Rotation
- Single Rotation

- Double Rotation
AVL TREE : DELETION
Deletion di AVL Tree juga sama seperti Deletion pada Binary Search Tree, namun seperti teknik lainnya pada AVL Tree, konsep Balance adalah yang membedakan.



Sekian yang saya pelajari hari ini, maaf bila ada kesalahan kata dan terima kasih atas waktunya. 

REFERENSI
- VIDCON kelas besar data structures Binus
- PPT BINUS

Comments

Popular posts from this blog

Rankuman Akhir

Rangkuman Akhir 10 Juni 2020 Nama: Johanes Peter Vincentius NIM: 2301864461 Nama Dosen:Henry Chong(D4460) & Ferdinand Ariandy Luwinda (D4522) Before continuing to my summary, i just want to make a clarification that I did not copas, and if the language is simillar, it's just because I summarize directly from PPT and use a bit of internet for clarification. The point is, I studied while making this summary, sorry if it might have a slight resemblance to the ppt. The summary : Heaps And Tries, both are a data structures algorithm concept In this blog I will be summarizing : Heap Concept Min Heap  Max Heap Min-Max Heap Heap Applications Tries Concept Tries Applications Heap is a complete binary tree which impliments the "heap" property. Heap property ?  Min Heap and Max Heap Min Heap means every node's element is smaller than its children's Max Heap means every node's element is larger than its children's ...

Pertemuan III Mengenai pengaplikasian Linked List

Linked List, banyak hal dapat dilakukan dalam linked list, seperti push(insert), pop(delete). memahami konsep Singly Linked List dapat dibilang relatif mudah, namun pengaplikasian kodingnya perlu waktu untuk pemahaman. Saya Johanes Peter akan merangkum apa yang diajarkan di kelas besar pertemuan 3, yaitu mengenai koding linked list. Struct struct Data {     int value;     struct Data *next,*prev; }*head,*curr,*tail; Push tail (insert sebuah data di paling belakang) void push(int a) {     curr = (struct Data*)malloc(sizeof(struct Data));     curr->value = a;     if(head==NULL){         head = tail = curr;     }     else{         tail->next = curr;         curr->prev = tail;         tail = curr;     }     head->prev = tail->next = NULL; } Print isi dalam...

HALF SEMESTER SUMMARY

Data Structures Summary Dear reader, due to the recent outbreak of the COVID-19 pandemic, we've all been forced to study at home. It is a challenge to keep track of the subject matter, so in this blog, I will be putting all my summary about what I've learned in this half semester from Data Structures. I've been thinking about the final project of making a pacman game using linked list... I can make a pacman game with 2d arrays, but a Linked List as a map ? It still leaves me in confusion ... For now I'll be studying more too be closer on approaching the final project Linked List II,  a linear data structure where each element is a separate object. Materials : - Circular Linked List - Circular Single Linked List - Doubly Linked List - Circular Doubly Linked List Circular Linked List Circular Single Linked List is a variation of linked list which its first element points to the last element and the last element points to the first element. In this list, there is...