Reference - https://programmers.co.kr/learn/courses/57
- insert algorithms
- find index algorithms
- bulit in sort method
- string sort method
- by using recursive implement fibonacci
- by using recursive implement binary_search algorithms
- Time Complexity
- Space Complexity
- Average Time Complexity
- Worst-case Time Complexity
- Bio-O Notation
examples)
> O(logn) - Size and log Proportion of Input : binary search algorithms.
> O(n) - Size and Proportion of Input : linear search algorithms.
> O(nlogn) - Merge sort algorithms.
> O(n2) - insert sort algoritms.
- Node
- LinkedList
- getAt() - certain element reference
- traverse() - list traversal
- getLenth()- get lenth
- insertAt(pos, newNode) - insert element
- popAt(pos) - delete element
- concat(L) - merge list to list
Methods
- push(x) - Insert data element at last index
- pop() - Return & delete data element at last index
- is_Empty() - Check Stack (boolean)
- peek() - Return data element at last index
Stack Application Examples.
-
Convet infix notation to postfix notation
-
Calculate postfix notation
Methods
- enqueue(x) - Insert data element at last index
- dequeue() - Return & delete data element at first index
- is_Empty() - Check Stack (boolean)
- peek() - Return data element at first index
- size() - Check how to many data counts
- isFull() - Check to data is full
Stack Application Examples.
- CircularQueue
- PriorityQueue
- nodes - edges
- root node - internal node - leaf node
- parents node - childs node
- Level of node
- Degree of node
- depth(height) of tree
- subtrees
size()- node counts
depth() - depth of tree
traversal() - tree traversal
order : left subtree -> self -> right subtree
order : self -> left subtree -> right subtree
order : left subtree -> right subtree -> self
- binary trees
- Level of all nodes is lower below 2.
- Can define recursive.
- full binary trees
- Filled with nodes at all level
- Height = k, nodes = 2**k -1
- complete binary trees
- Height = k
- Up to level k - 2, all nodes is full binary tree with two children
- At level k - 1, a binary tree with nodes sequentially filled from the left
- init() - Create empty heap
- insert(item) - Insert new data item
- remove() - Max data(root node) return & remove
- maxHeapify() - Use recursive algorithms to remove data
node number : m
- left child number : 2 * m
- right child number : 2 * m + 1
- parent node number : m /// 2
- Prioirity Queue
- Heap Sort