Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 56 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ graph LR

### ドキュメント階層技術仕様

| 階層 | ファイル | 対象 | 技術スタック | 主要機能 | ファイルサイズ |
| ------------------ | ----------------- | ------------------------ | ------------------------------ | ----------------------------------------------------------------------------------- | ------------------- |
| **1. Static** | README.md | CS学習者、初心者 | 純粋なMarkdown、依存関係なし | 問題概要、アルゴリズム説明、複雑度分析O(n)、実装詳細、最適化議論 | ~1KB、200-400行 |
| **2. Interactive** | README.html | 競技プログラマー | Prism.js、Tailwind CSS | 構文ハイライト、Play/Pause/Stepコントロール、状態可視化、SVGフローチャート描画 | ~50KB、1000-2000行 |
| **3. Dynamic** | README_react.html | パフォーマンスエンジニア | React 18 UMDBabel Standalone | React Hooks (useState, useEffect)、リアルタイム入力操作、アルゴリズム再実行、AI比較 | ~100KB、2000-4000行 |
| 階層 | ファイル | 対象 | 技術スタック | 主要機能 | ファイルサイズ |
| ------------------ | ----------------- | ------------------------ | ---------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------- |
| **1. Static** | README.md | CS学習者、初心者 | 純粋なMarkdown、依存関係なし | 問題概要、アルゴリズム説明、複雑度分析O(n)、実装詳細、最適化議論 | ~1KB、200-400行 |
| **2. Interactive** | README.html | 競技プログラマー | Prism.js、Tailwind CSS | 構文ハイライト、Play/Pause/Stepコントロール、状態可視化、SVGフローチャート描画 | ~50KB、1000-2000行 |
| **3. Dynamic** | README_react.html | パフォーマンスエンジニア | React 18 UMD (Local), Babel Standalone (Local) | React Hooks (useState, useEffect)、リアルタイム入力操作、アルゴリズム再実行、AI比較 | ~100KB、2000-4000行 |

### 静的ドキュメント構造(階層1)

Expand Down Expand Up @@ -291,7 +291,7 @@ graph TB
end

subgraph "ドキュメントレイヤー"
D1[CDN経由の外部ライブラリ]
D1[ローカル管理された外部ライブラリ (Vendor)]
D2[Prism.js, Tailwind, React]
D3[README.html, README_react.html]
end
Expand Down Expand Up @@ -375,14 +375,14 @@ def daily_active_users(activity: pd.DataFrame) -> pd.DataFrame:

### ファイルタイプ仕様

| ファイルタイプ | 命名パターン | コード構造 | ファイルサイズ | パス例 |
| -------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Python実装** | `{ProblemName}.py` (Claude)<br>`{ProblemName}_py.ipynb` (GPT) | `class Solution:`<br>`def {methodName}(self, ...) -> ...:`<br>ヘルパーメソッドを含む場合あり | ~50-200行 | `Algorithm/DynamicProgramming/leetcode/97. Interleaving String/claude sonnet 4.5/Interleaving_String.py` |
| **TypeScript実装** | `{ProblemName}.ts` (Claude)<br>`{ProblemName}_ts.ipynb` (GPT) | `function {functionName}(...): ReturnType { ... }`<br>または<br>`class Solution { {methodName}(...): ReturnType { ... } }` | ~50-200行 | `Algorithm/DynamicProgramming/leetcode/97. Interleaving String/gpt 5.1 thinking customized/Interleaving_String_ts.ipynb` |
| **JavaScript実装** | `{ProblemName}.js` (Claude)<br>`{ProblemName}_js.ipynb` (GPT) | `var {functionName} = function(...) { ... };`<br>`module.exports = { {functionName} };` | ~50-200行 | `Algorithm/DynamicProgramming/leetcode/97. Interleaving String/claude sonnet 4.5/Interleaving_String.js` |
| **静的ドキュメント** | `README.md` | 5セクションMarkdown:<br>1. Overview (`<h2 id="overview">`)<br>2. Algorithm (`<h2 id="tldr">`)<br>3. Complexity (`<h2 id="complexity">`)<br>4. Implementation (`<h2 id="impl">`)<br>5. Optimization (`<h2 id="cpython">`) | 3000-5000語<br>(~200-400行) | `Algorithm/DynamicProgramming/leetcode/97. Interleaving String/claude sonnet 4.5/README.md` |
| **対話型HTML** | `README.html` | 埋め込みJavaScriptを含むHTML:<br>`<script src="...prism.js"></script>`<br>`<script src="...tailwindcss.com"></script>`<br>ボタン付きステップコントロールシステム | 1000-2000行<br>(~50KB) | `Algorithm/DynamicProgramming/leetcode/97. Interleaving String/claude sonnet 4.5/README.html` |
| **React可視化** | `README_react.html` | React CDNを含むHTML:<br>`<script src="...react.development.js"></script>`<br>`<script src="...babel.standalone.js"></script>`<br>`<script type="text/babel">`内のJSXコンポーネント | 2000-4000行<br>(~100KB) | `Algorithm/BinarySearch/leetcode/99. Recover Binary Search Tree/Claude Opus 4.5/README_react.html` |
| ファイルタイプ | 命名パターン | コード構造 | ファイルサイズ | パス例 |
| -------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Python実装** | `{ProblemName}.py` (Claude)<br>`{ProblemName}_py.ipynb` (GPT) | `class Solution:`<br>`def {methodName}(self, ...) -> ...:`<br>ヘルパーメソッドを含む場合あり | ~50-200行 | `Algorithm/DynamicProgramming/leetcode/97. Interleaving String/claude sonnet 4.5/Interleaving_String.py` |
| **TypeScript実装** | `{ProblemName}.ts` (Claude)<br>`{ProblemName}_ts.ipynb` (GPT) | `function {functionName}(...): ReturnType { ... }`<br>または<br>`class Solution { {methodName}(...): ReturnType { ... } }` | ~50-200行 | `Algorithm/DynamicProgramming/leetcode/97. Interleaving String/gpt 5.1 thinking customized/Interleaving_String_ts.ipynb` |
| **JavaScript実装** | `{ProblemName}.js` (Claude)<br>`{ProblemName}_js.ipynb` (GPT) | `var {functionName} = function(...) { ... };`<br>`module.exports = { {functionName} };` | ~50-200行 | `Algorithm/DynamicProgramming/leetcode/97. Interleaving String/claude sonnet 4.5/Interleaving_String.js` |
| **静的ドキュメント** | `README.md` | 5セクションMarkdown:<br>1. Overview (`<h2 id="overview">`)<br>2. Algorithm (`<h2 id="tldr">`)<br>3. Complexity (`<h2 id="complexity">`)<br>4. Implementation (`<h2 id="impl">`)<br>5. Optimization (`<h2 id="cpython">`) | 3000-5000語<br>(~200-400行) | `Algorithm/DynamicProgramming/leetcode/97. Interleaving String/claude sonnet 4.5/README.md` |
| **対話型HTML** | `README.html` | ローカルベンダー管理のスクリプトを読み込むHTML:<br>`<script src="/vendor/prismjs/prism.js"></script>`<br>`<script src="/vendor/tailwindcss/script.js"></script>`<br>ボタン付きステップコントロールシステム | 1000-2000行<br>(~50KB) | `Algorithm/DynamicProgramming/leetcode/97. Interleaving String/claude sonnet 4.5/README.html` |
| **React可視化** | `README_react.html` | ローカルベンダー管理のスクリプトを読み込むHTML:<br>`<script src="/vendor/react/react.development.js"></script>`<br>`<script src="/vendor/babel/babel.min.js"></script>`<br>`<script type="text/babel">`内のJSXコンポーネント | 2000-4000行<br>(~100KB) | `Algorithm/BinarySearch/leetcode/99. Recover Binary Search Tree/Claude Opus 4.5/README_react.html` |

### コード構造ブリッジ: クラスと関数パターン

Expand Down Expand Up @@ -545,6 +545,48 @@ graph TD

---

## 開発セットアップ

このプロジェクトは、依存関係管理に`bun`を使用し、成果物生成にPythonを使用します。

### 前提条件

- [Bun](https://bun.sh) (v1.0.0+)
- Python 3.11+

### セットアップ手順

1. **リポジトリのクローン**:

```bash
git clone https://github.com/myoshi2891/Algorithm-DataStructures-Math-SQL.git
cd Algorithm-DataStructures-Math-SQL
```

2. **依存関係のインストール**:

```bash
bun install
```

3. **インデックスと成果物のビルド**:

```bash
./update_index.sh
```

これにより、`public/`ディレクトリが生成され、必要なベンダーファイルがコピーされます。

4. **ローカルサーバーの起動**:

```bash
bun run serve
```

ブラウザで `http://127.0.0.1:8080` を開いて確認します。
Comment on lines +580 to +586

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

npxbunx に修正し、既存の live-server devDependency を使用してください。

2点の問題があります:

  1. コーディングガイドライン違反: プロジェクトは Bun をパッケージマネージャーとして使用しています。npx の代わりに bunx を使うべきです。
  2. 依存関係の不整合: http-serverpackage.json の依存関係に含まれていませんが、live-server はすでに devDependencies に宣言されています。未宣言のパッケージ (http-server) を npx で実行するよりも、宣言済みの live-serverbunx で実行する方が一貫性があります。
🛠️ 修正案
-    npx http-server public
+    bunx live-server public

または、package.json に専用スクリプトを追加する方法もあります:

 "scripts": {
     "dev": "tsx Algorithm/ts/main.ts",
+    "serve": "live-server public",
     "test": "vitest run",

README.md:

-    npx http-server public
+    bun run serve

コーディングガイドラインより:package.json: Use Bun as the package manager; use bun install instead of npm install

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 580 - 586, Replace the incorrect `npx http-server
public` instruction with Bun-compatible usage and the declared devDependency:
either change the README command to `bunx live-server public` (using the
existing live-server devDependency) or add a package.json script like `"dev":
"live-server public"` and update the README to run it with `bunx run dev`;
update any example commands to use `bun`/`bunx` consistently to follow the
project's Bun package manager guideline and avoid referencing undeclared
`http-server`.


---

## インデックスメンテナンス

リポジトリのドキュメントインデックス(`public/index.html`)は自動生成されます。開発者は、新しい問題を追加した後にインデックスを最新の状態に保つために、Gitプレコミットフックを設定することが推奨されます。
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"name": "algorithm-study",
"description": "A deterministic multi-language algorithm study repository (Python/TS/JS) with auto-generated documentation and local dependency management.",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "tsx Algorithm/ts/main.ts",
"serve": "live-server public",
"test": "vitest run",
"lint": "prettier -c . && eslint .",
"fmt": "prettier -w ."
Expand Down