demo_algorithms

command
v0.0.0-...-2459bba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2019 License: MIT Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL