Are a type of binary search tree in which the heights of the two child subtrees of any node differ by at most one. Otherwise it self-balances.
When a new node is inserted into an AVL tree, it is first inserted into a regular binary search tree. Then the tree is rotated to restore the AVL property.
Search, insert and delete operations take O(log n)
time in both the average and worst cases.
See more 📚
Are a type of binary search tree in which all the nodes are either red or black.
When a new node is inserted into a RB tree, it is first inserted into a regular binary search tree. Then the tree is rotated to restore the RB property.
Search, insert and delete operations take O(log n)
time in both the average and worst cases.
See more 📚
Is a divide and conquer algorithm that sorts a list of elements by recursively splitting the list into two equal halves, sorting each half, and then merging the two sorted halves. The merge step is the most difficult step of the algorithm.
Time complexity of merge sort is O(n log n)
in all cases.
Is a sorting algorithm that sorts data based on the digits in the number. It works by dividing the input list into a number of lists, each containing only numbers that have a certain digit in the position being considered. Then the lists are merged to produce the final sorted output. That's why it is a non-comparative sort algorithm. In this case, the first digit being considered is the least significant digit.
Time complexity of radix sort is O(nk)
where k
is the number of digits in the largest number in the input list.
Licenciatura Engenharia Informática - Universidade de Coimbra
Algoritmos e Estruturas de Dados - 2019/2020
Coimbra, 17 de abril de 2020
Have a look at the license file for details