bst and hashes
admin
11月 30, 2020
0
Tree
- iterate, binary search, divide and conquer
BST and Hash Table
BST operation
- BST inserting and searching
- insertion: tree binary search
- searching:
- insertion complexity
- time: O(h) log(n)~n
- sqace: O(h)
- speciality
- root.right > root > root.left
- insertion operation: has only position to insert
- high efficient of searching
binary and divide and conquer
- binary search : for sorted thing, become big problem to small problem by sorted algorithm
- time complexity : O(log(n))
- divide and conquer :
- big question to small question
- samll solution become to big question solution
- example
- isIdentical, isBalanceTree
- last class: MaxHeight, path,
BST and hash table realized by index
- searching a data in table need O(n) time
Hash Table in JAVA
question
- BST How to realized left < right? when executing operation
近期评论