Workflow in the process of contributing to a project. git clone, git checkout, git add, git commit, git pull, git push, git fetch, git merge, git rebase, pull request.
Sort Algorithm 3 - Merge Sort
Array
1 |
|
(1) average cost time: T(n) = O(nlogn)
(2) average cost space: S(n) = O(n)
(3) Not in-place sort
(4) stable
(5) best T(n) = O(nlogn), worst T(n) = O(nlogn)
Linked List
lc 148: Given the head of a linked list, return the list after sorting it in ascending order.
1 | def sortList(head): |
(1) average cost time: T(n) = O(nlogn)
(2) average cost space: S(n) = O(1)
(3) in-place
(4) stable
(5) best T(n) = O(nlogn), worst T(n) = O(nlogn)
Sort Algorithm 2 - Quick Sort
1 | def solution(nums): |
(1) avarage time cost: T(n) = O(nlogn)
(2) avarage time cost: S(n) = O(logn)
(3) in-place sort
(4) unstable
(5) best T(n)= O(nlogn), worst T(n) = O(nlogn)
Sort Algorithm 1 - Bubble Sort
1 | def bubbleSort(nums): |
(1) average time cost T(n): O(n^2)
(2) average space cost S(n): O(1)
(3) in-place sort
(4) stable
(5) best T(n): O(n); Worst T(n): O(n^2)
Hexo: Command not found
Min Stack, LRU Cache
lc155 Min Stack, lc225 Implement Stack using Queues, lc146 LRU Cache
Design Stack and Queue
lc225 Implement Stack using Queues, lc232 Implement Queue using Stacks
Stack
stack, deque
Binary Search I
Basic understanding of binary search. lc 704, lc 35.
Find Object Elements
array, object, references, callback function, arrow function