Documentation ¶
Overview ¶
3.7 Bernoulli test A test throw corn N times, see how many times gets the front side. M round tests at total.
3.8 Close point pairs count with O(n^2)
5.11 Dynamic programming algorithm - Fibonacci
5.3
3.6 Sieve of Eratosthenes
5.7
5.13 Dynamic programming algorithm - Knapsack problem
5.6
5.2
2.1 Search() 2.2 Search2()
3.9 Linked ring without head Each node arrowed to its left node,
Ex., when N=9, we get 1->2->3->4->5->6->7->8->9->(1)
Josephus problem Reduce one every count to M, till leave one to be the leader
Ex., when M=5, we get 5->1->7->4->3->6->9->2->(8), 8 is the leader.
Click to show internal directories.
Click to hide internal directories.