Skip to content

airingursb/algorithm-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bcfd1fe · Oct 2, 2017

History

11 Commits
Oct 2, 2017
Oct 2, 2017
Sep 17, 2017
Oct 2, 2017
Sep 17, 2017
Sep 17, 2017
Sep 17, 2017
Sep 17, 2017
Sep 17, 2017

Repository files navigation

Airing 的算法实验室

使用 TypeScript 编写的一些有趣的算法实验。

线上地址:http://lib.ursb.me

目录

  1. 百人分钱问题
    1. 百人分钱 | 不许负债
    2. 百人分钱 | 允许负债
  2. 蒙特卡洛算法
    1. 求解圆周率
  3. 排序算法
    1. 选择排序 Selection Sort
    2. 插入排序 Insertion Sort
    3. 插入排序 | 近乎有序 Insertion Sort with Nearly Ordered Array
    4. 归并排序 | 自顶向下 Merge Sort TD
    5. 归并排序 | 自底向上 Merge Sort BD
    6. 快速排序 Quick Sort
    7. 快速排序 | 近乎有序 Quick Sort with Nearly Ordered Array
    8. 快速排序 | 随机定点 Quick Sort with Random Pivot
    9. 快速排序 | 完全一致 Quick Sort with Identical Array
    10. 双路快速排序 Two Ways Quick Sort
    11. 双路快速排序 | 完全一致 Two Ways Quick Sort with Identical Array
    12. 三路快速排序 Three Ways Quick Sort

安装

git clone https://github.com/airingursb/algorithm-lab.git
cd algorithm-lab
npm install
node app/bin/www.js --harmony

Then open Browser at 'http://localhost:9009'

修改算法代码

Step 1. 编译 TypeScript

tsc

Step 2. 打包 js 文件

需要先安装 browserify

npm install -g browserify

再进入对应的算法输出目录,打包代码

browserify main.js -o bundle.js

Screenshots

About

💫 算室:Airing 的算法实验室

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published