Skip to content

Commit

Permalink
Merge pull request #15 from kwooshung/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
kwooshung authored Feb 1, 2024
2 parents 67dd727 + ca9c58c commit afd8943
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 22 deletions.
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,41 +59,41 @@ As the project name suggests, our project's algorithms only support `sorting`. I

The comparison involves random data of 1000 items, with string lengths varying from 6 to 32 and numbers ranging from 0 to 1,000,000, as shown below:

| Algorithm | algorithms.js | @kwooshung/AlgorithmSorts | Difference |
| :---------------------- | :-----------: | :-----------------------: | :------------: |
| Bubble Sort | 65.0368 ms | 65.0298 ms | -0.0070 ms |
| Shout Bubble Sort | 13251.3260 ms | 128.2500 ms | -13123.0760 ms |
| Cocktail Sort | - | 52.7166 ms | - |
| Counting Sort | - | 12.3503 ms | - |
| Optimized Counting Sort | 33.2357 ms | 32.6380 ms | -0.5977 ms |
| Heap Sort | 8.3025 ms | 4.6525 ms | -3.6500 ms |
| Insertion Sort | 27.4480 ms | 27.4331 ms | -0.0149 ms |
| Merge Sort | 2.9167 ms | 2.5592 ms | -0.3575 ms |
| Pancake Sort | - | 57.7009 ms | 0 ms |
| Quick Sort | 3.0599 ms | 2.6374 ms | -0.4225 ms |
| Radix Sort | 0.2070 ms | 0.1339 ms | -0.0731 ms |
| Selection Sort | 55.8389 ms | 55.8000 ms | -0.0389 ms |
| Shell Sort | 3.1775 ms | 3.1564 ms | -0.0211 ms |
| Tim Sort | - | 6.7950 ms | - |
| Algorithm | algorithms.js | pnpm add @kwooshung/console-badge | Difference |
| :---------------------- | :-----------: | :-------------------------------: | :------------: |
| Bubble Sort | 65.0368 ms | 65.0298 ms | -0.0070 ms |
| Shout Bubble Sort | 13251.3260 ms | 128.2500 ms | -13123.0760 ms |
| Cocktail Sort | - | 52.7166 ms | - |
| Counting Sort | - | 12.3503 ms | - |
| Optimized Counting Sort | 33.2357 ms | 32.6380 ms | -0.5977 ms |
| Heap Sort | 8.3025 ms | 4.6525 ms | -3.6500 ms |
| Insertion Sort | 27.4480 ms | 27.4331 ms | -0.0149 ms |
| Merge Sort | 2.9167 ms | 2.5592 ms | -0.3575 ms |
| Pancake Sort | - | 57.7009 ms | 0 ms |
| Quick Sort | 3.0599 ms | 2.6374 ms | -0.4225 ms |
| Radix Sort | 0.2070 ms | 0.1339 ms | -0.0731 ms |
| Selection Sort | 55.8389 ms | 55.8000 ms | -0.0389 ms |
| Shell Sort | 3.1775 ms | 3.1564 ms | -0.0211 ms |
| Tim Sort | - | 6.7950 ms | - |

# Install

## npm

```bash
npm install @kwooshung/AlgorithmSorts
npm install pnpm add @kwooshung/console-badge
```

## yarn

```bash
yarn add @kwooshung/AlgorithmSorts
yarn add pnpm add @kwooshung/console-badge
```

## pnpm

```bash
pnpm add @kwooshung/AlgorithmSorts
pnpm add pnpm add @kwooshung/console-badge
```

# Usage
Expand All @@ -103,13 +103,13 @@ pnpm add @kwooshung/AlgorithmSorts
### esm

```ts
import { bubbleSort } from '@kwooshung/AlgorithmSorts';
import { bubbleSort } from 'pnpm add @kwooshung/console-badge';
```

### commonjs

```ts
const { bubbleSort } = require('@kwooshung/AlgorithmSorts');
const { bubbleSort } = require('pnpm add @kwooshung/console-badge');
```

## Supported Algorithms
Expand Down
1 change: 1 addition & 0 deletions changelogs/.history
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
1.0.13
1.0.12
1.0.11
1.0.10
Expand Down
4 changes: 4 additions & 0 deletions changelogs/CHANGELOG.en.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 🎉 1.0.13 `2024-02-02`
### 🐛 Fix
- English document, install command to write errors ([#ecf809d](https://github.com/kwooshung/algorithm-sorts/commit/ecf809d68524f23a4d3d026120d8a4fc29d38cb6))

## 🎉 1.0.12 `2024-02-02`
### 🐛 Fix
- Quality Test badges address ([#00a6ef5](https://github.com/kwooshung/algorithm-sorts/commit/00a6ef56c0833b619f1db75f81f0fa8d87d95d7e))
Expand Down
4 changes: 4 additions & 0 deletions changelogs/CHANGELOG.ja.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 🎉 1.0.13 `2024-02-02`
### 🐛 Fix
- 英語文書、コマンドをインストールしてエラーを書き込む ([#ecf809d](https://github.com/kwooshung/algorithm-sorts/commit/ecf809d68524f23a4d3d026120d8a4fc29d38cb6))

## 🎉 1.0.12 `2024-02-02`
### 🐛 Fix
- 高品質のテストバッジアドレス ([#00a6ef5](https://github.com/kwooshung/algorithm-sorts/commit/00a6ef56c0833b619f1db75f81f0fa8d87d95d7e))
Expand Down
4 changes: 4 additions & 0 deletions changelogs/CHANGELOG.ko.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 🎉 1.0.13 `2024-02-02`
### 🐛 Fix
- 영어 문서, 명령을 설치하여 오류를 작성하십시오 ([#ecf809d](https://github.com/kwooshung/algorithm-sorts/commit/ecf809d68524f23a4d3d026120d8a4fc29d38cb6))

## 🎉 1.0.12 `2024-02-02`
### 🐛 Fix
- 품질 테스트 배지 주소 ([#00a6ef5](https://github.com/kwooshung/algorithm-sorts/commit/00a6ef56c0833b619f1db75f81f0fa8d87d95d7e))
Expand Down
4 changes: 4 additions & 0 deletions changelogs/CHANGELOG.ru.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 🎉 1.0.13 `2024-02-02`
### 🐛 Fix
- Английский документ, установить команду для написания ошибок ([#ecf809d](https://github.com/kwooshung/algorithm-sorts/commit/ecf809d68524f23a4d3d026120d8a4fc29d38cb6))

## 🎉 1.0.12 `2024-02-02`
### 🐛 Fix
- Адрес тестирования качества ([#00a6ef5](https://github.com/kwooshung/algorithm-sorts/commit/00a6ef56c0833b619f1db75f81f0fa8d87d95d7e))
Expand Down
4 changes: 4 additions & 0 deletions changelogs/CHANGELOG.zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 🎉 1.0.13 `2024-02-02`
### 🐛 Fix
- 英语文档,安装命令写错误 ([#ecf809d](https://github.com/kwooshung/algorithm-sorts/commit/ecf809d68524f23a4d3d026120d8a4fc29d38cb6))

## 🎉 1.0.12 `2024-02-02`
### 🐛 Fix
- 质量测试徽章地址 ([#00a6ef5](https://github.com/kwooshung/algorithm-sorts/commit/00a6ef56c0833b619f1db75f81f0fa8d87d95d7e))
Expand Down
4 changes: 4 additions & 0 deletions changelogs/CHANGELOG.zh-tw.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 🎉 1.0.13 `2024-02-02`
### 🐛 Fix
- 英語文檔,安裝命令寫錯誤 ([#ecf809d](https://github.com/kwooshung/algorithm-sorts/commit/ecf809d68524f23a4d3d026120d8a4fc29d38cb6))

## 🎉 1.0.12 `2024-02-02`
### 🐛 Fix
- 質量測試徽章地址 ([#00a6ef5](https://github.com/kwooshung/algorithm-sorts/commit/00a6ef56c0833b619f1db75f81f0fa8d87d95d7e))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kwooshung/algorithm-sorts",
"version": "1.0.12",
"version": "1.0.13",
"title": "algorithm-sorts",
"description": "Better algorithm implementation library",
"private": false,
Expand Down

0 comments on commit afd8943

Please sign in to comment.