{"id":31322871,"url":"https://github.com/jack74387/data-structure-and-algorithm","last_synced_at":"2026-05-19T10:01:18.378Z","repository":{"id":316404111,"uuid":"1055913196","full_name":"jack74387/Data-Structure-and-Algorithm","owner":"jack74387","description":"Data Structure and Algorithm","archived":false,"fork":false,"pushed_at":"2025-09-24T10:45:57.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-24T12:32:10.039Z","etag":null,"topics":["algorithms","cpp","datastructures","gui","qt"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jack74387.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-13T03:10:04.000Z","updated_at":"2025-09-24T10:46:01.000Z","dependencies_parsed_at":"2025-09-24T12:32:12.328Z","dependency_job_id":null,"html_url":"https://github.com/jack74387/Data-Structure-and-Algorithm","commit_stats":null,"previous_names":["jack74387/data-structure-and-algorithm"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jack74387/Data-Structure-and-Algorithm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack74387%2FData-Structure-and-Algorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack74387%2FData-Structure-and-Algorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack74387%2FData-Structure-and-Algorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack74387%2FData-Structure-and-Algorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jack74387","download_url":"https://codeload.github.com/jack74387/Data-Structure-and-Algorithm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack74387%2FData-Structure-and-Algorithm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276967757,"owners_count":25737116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-25T02:00:09.612Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","cpp","datastructures","gui","qt"],"created_at":"2025-09-25T19:25:50.364Z","updated_at":"2025-09-25T19:25:54.054Z","avatar_url":"https://github.com/jack74387.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 資料結構與演算法專案集合\n\n這個專案集合包含了多種常見的資料結構與演算法的 C++ 實作。每個專案都使用 Qt 框架提供圖形化使用者介面（GUI），讓演算法的執行過程可以被視覺化地展示。每個資料夾都代表一個獨立的專案，專注於一種特定的演算法或資料結構。\n\n---\n\n## 專案列表\n\n### 排序演算法 (Sorting Algorithms)\n\n-   **`bubble_sort/` - 氣泡排序**\n    -   **功用**: 一種簡單的排序演算法。它會重複地遍歷待排序的數列，一次比較兩個元素，如果他們的順序錯誤就把他們交換過來。\n\n-   **`insertion_sot/` (insertion_sort) - 插入排序**\n    -   **功用**: 一種簡單直觀的排序演算法。它的工作原理是通過構建有序序列，對於未排序數據，在已排序序列中從後向前掃描，找到相應位置並插入。\n\n-   **`quick_sort/` - 快速排序**\n    -   **功用**: 一種高效率的排序演算法，採用分治法（Divide and Conquer）策略。它選擇一個「基準」(pivot) 元素，並將數列分割成兩個子陣列，一個子陣列中所有元素都比基準值小，另一個子陣列中所有元素都比基準值大，然後對這兩個子陣列進行遞迴排序。\n\n-   **`counting_sort/` - 計數排序**\n    -   **功用**: 一種非比較排序演算法，適用於整數排序。它通過計算每個不同整數出現的次數，來確定每個整數在排序後數列中的位置。\n\n### 樹狀資料結構 (Tree Data Structures)\n\n-   **`binary_search_tree/` - 二元搜尋樹**\n    -   **功用**: 一種節點有序的二元樹，其左子樹的所有節點值均小於根節點值，右子樹的所有節點值均大於根節點值。這使得元素的搜尋、插入和刪除等操作非常高效。\n\n-   **`avl_tree/` - AVL 樹**\n    -   **功用**: 自平衡二元搜尋樹。在 AVL 樹中，任何節點的兩個子樹的高度最大差別為 1，這確保了樹的平衡，從而保證了操作的時間複雜度為 O(log n)。\n\n-   **`2-3-4-tree/` - 2-3-4 樹**\n    -   **功用**: 一種自平衡的多路搜尋樹，其中每個節點可以有 2、3 或 4 個子節點。它能保持樹的平衡，確保所有葉節點都在同一深度。\n\n-   **`binary_tree_traversal/` - 二元樹遍歷**\n    -   **功用**: 實作了遍歷二元樹的幾種基本方法，如前序（Pre-order）、中序（In-order）和後序（Post-order）遍歷。\n\n-   **`delete_node/` \u0026 `search_node/` - 樹節點操作**\n    -   **功用**: 專注於二元搜尋樹中的特定操作：節點的搜尋與刪除。\n\n-   **`rebuild_tree/` - 重建二元樹**\n    -   **功用**: 根據給定的前序和中序遍歷結果，重建原始的二元樹結構。\n\n-   **`Optimal_binary_searching_tree/` - 最佳二元搜尋樹**\n    -   **功用**: 一種動態規劃的應用，旨在建立一棵平均搜尋成本最低的二元搜尋樹，特別適用於搜尋頻率不均等的元素集合。\n\n### 圖論演算法 (Graph Algorithms)\n\n-   **`Directed_graph/` - 有向圖**\n    -   **功用**: 實作有向圖的基本結構與操作，其中邊具有方向性。\n\n-   **`Dijkstra-s_algorithm/` - 戴克斯特拉演算法**\n    -   **功用**: 用於尋找圖中單一源點到所有其他節點的最短路徑。適用於權重為非負值的圖。\n\n-   **`Floyd_warshall_algorithm/` - 佛洛伊德-華歇爾演算法**\n    -   **功用**: 一種動態規劃演算法，用於尋找加權圖中所有節點對之間的最短路徑。可以處理帶有負權重的邊。\n\n-   **`Kruskal-s_Algorithm/` - 克魯斯克爾演算法**\n    -   **功用**: 一種尋找圖的最小生成樹（MST）的貪婪演算法。它會選擇權重最小的邊來連接節點，同時避免形成環路。\n\n-   **`Prime-s_algorithm/` (Prim's_algorithm) - 普林姆演算法**\n    -   **功用**: 另一種尋找圖的最小生成樹（MST）的貪婪演算法。它從一個起始節點開始，逐步擴展生成樹，每次都選擇連接到樹的權重最小的邊。\n\n### 動態規劃與其他演算法 (Dynamic Programming \u0026 Others)\n\n-   **`knapsack/` - 背包問題**\n    -   **功用**: 一個經典的組合最佳化問題，旨在在給定容量限制下，選擇一組物品以達到最大價值。此專案實作了 0/1 背包問題的動態規劃解法。\n\n-   **`knapsack_seafood/` - 海鮮背包問題**\n    -   **功用**: 這是背包問題的一個具體應用場景。\n\n-   **`MatrixChainProduction/` - 矩陣鏈乘法**\n    -   **功用**: 一個動態規劃的經典問題，旨在找到計算一系列矩陣乘積的最有效方式（即最少的純量乘法次數）。\n\n### 其他 (Miscellaneous)\n\n-   **`koch_curve/` - 科赫曲線**\n    -   **功用**: 一個碎形（Fractal）的生成範例。科赫曲線是一個在任何地方都連續但無處可微分的曲線。\n\n-   **`guess/` - 猜數字遊戲**\n    -   **功用**: 一個簡單的互動遊戲，計算各玩家猜拳比賽的勝率。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack74387%2Fdata-structure-and-algorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjack74387%2Fdata-structure-and-algorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack74387%2Fdata-structure-and-algorithm/lists"}