Search this site
Embedded Files
Skip to main content
Skip to navigation
Ming-Hsien Tsai
Algorithms
This page provides links to my implementation of several basic algorithms in Javascript.
FindSubsetModN
: Given a set of integers S = {x
1
, x
2
, ..., x
n
}, find a nonempty subset R ⊆ S such that Σ R ≡ 0 (mod n).
HeapsortRearrangeAnimated
: Rearrange an array by a bottom up approach to satisfy the heap property.
HeapsortAnimated
: Sort numbers by the Heapsort algorithm.
KnapsackDynamicProgramming
: Solve the Knapsack problem by dynamic programming.
KnapsackDynamicProgrammingAnimated
: Solve the Knapsack problem by dynamic programming with animation.
KnapsackRecursive
: Solve the Knapsack problem by recursive calls.
KnapsackRecursiveAnimated
: Solve the Knapsack problem by recursive calls with animation.
MergesortAnimated
: Sort numbers by the Mergesort algorithm.
PartitionAnimated
: Perform the partition procedure in the Quicksort algorithm.
QuicksortAnimated
: Sort numbers by the Quicksort algorithm.
TowerOfHanoi3
: Solve the Tower of Hanoi problem with three pegs.
TowerOfHanoi4
: Solve the Tower of Hanoi problem with four pegs.
TowerOfHanoi4_Opt
: Solve the Tower of Hanoi problem with four pegs by a presumed-optimal solution.
TowerOfHanoi5
: Solve the Tower of Hanoi problem with five pegs.
TowerOfHanoiN
: Solve the Tower of Hanoi problem with N pegs.
TowerOfHanoiN_Frame_Stewart
: Solve the Tower of Hanoi problem with N pegs by the Frame-Stewart algorithm.
Google Sites
Report abuse
Google Sites
Report abuse