HashTables - Concepts, Theory , Questions - Codophilic:
liner search
binary search --the sorted data needed lgN
Hash Table- O(1) --constant time search
Dynamic Set:
-Insert(S,x)
-Delete(S,x)
-Search(S,x)
Direct Address Tables:
Problem: not applicable to strings or when m is very large(not enough memory)
we use a hash funciton which maps h(x) -->y in (1..m)
Challenge:
when two keys maps to same y, we reslove using:
--changing: List for each table slot
--Open Addressing: Linear Probing
--Bucket Addressing
B*TREE
B-TREE
B+TREE
B TREE or M TREE or Binary TREE
Data Strcuture Tutorial #14 - AVL Tree
ALV TREE should be height balanced tree with BF(Balance Factor) is no more than (-1, 0 1)
LL LR RR RL rotation will be used to make the AVL tree to be rebanlanced;
Data Structure Tutorial #2 - Sorting Techniques Session #1
Below are the main Sorting techniques
Radix Sort, Merge Sort,
Bubble Sort O(n^2)
i=1,j=n then i=1 ,j=n-1 a[i] cmp a[i+1]
Insertion Sort
cmp with ajacent two O(n^2)
Selection Sort O(N^2)
a[1] cmp a[2-j] then a[2] cmp a[3-j]
Quick SOrt