演算法 & Leetcode === **目錄** [TOC] # 基本概念 ![資料結構與演算法1](https://hackmd.io/_uploads/BJBc8M85T.png) ![資料結構與演算法](https://hackmd.io/_uploads/HJMVHML96.png) ▲Picure 1 資料結構與演算法的關係 學習參考: https://web.ntnu.edu.tw/~algo/ 學習參考: [YUI HUANG 演算法學習筆記](https://yuihuang.com/syntax/) 學習參考: [認識資料結構](https://hackmd.io/@howkii-studio/apcs_overview/https%3A%2F%2Fhackmd.io%2F%40howkii-studio%2Fdata_structure) 學習參考: [資料結構與演算法完整教學](https://www.youtube.com/watch?v=-LmHUlozTqE&list=PLJVnEM2pdJ5PmU8FOhlLTSgcl3PXqaln7) ## BigO 複雜度 ### 定義 * 文章介紹: [Big O 時間複雜度是什麼?](https://medium.com/@steph.c/big-o-%E6%99%82%E9%96%93%E8%A4%87%E9%9B%9C%E5%BA%A6%E6%98%AF%E4%BB%80%E9%BA%BC-fb2629fd5812) * 影片介紹: [Big O 不難!初學者必看的演算法入門篇(含圖解)](https://www.youtube.com/watch?v=es82PRNCn9I&list=RDCMUCZ0PZi7oCPH_eUqBpNbBy0Q&start_radio=1&rv=es82PRNCn9I&t=446) 1. Big O 的基本定義 ![image](https://hackmd.io/_uploads/HyZICdO2a.png) 2. Big O 的種類 ![image](https://hackmd.io/_uploads/SJe2R_dna.png) 3. 時間分配 ![image](https://hackmd.io/_uploads/ByjayKunT.png) ## DFS / BFS **DFS(Depth-First-Search)** 1. 定義 2. 實作 **BFS(Breadth-First-Search)** 1. 定義 2. 實作 ## Array & List 學習參考: [認識資料結構](https://hackmd.io/@howkii-studio/apcs_overview/https%3A%2F%2Fhackmd.io%2F%40howkii-studio%2Fdata_structure) ## Stack & Queue 學習參考: [認識資料結構](https://hackmd.io/@howkii-studio/apcs_overview/https%3A%2F%2Fhackmd.io%2F%40howkii-studio%2Fdata_structure) ## 線性排序法 學習參考: [認識資料結構](https://hackmd.io/@howkii-studio/apcs_overview/https%3A%2F%2Fhackmd.io%2F%40howkii-studio%2Fdata_structure) ## 五大演算法排序策略 學習參考: [[軟體工程師雜談] 輕鬆搞懂演算法:常用演算法策略:暴力法,貪婪法,分治法,回溯法,分支限界法 |IT鐵人賽: 從零開始搞懂寫程式,資料結構,演算法,物件導向](https://www.youtube.com/watch?v=iLK48YAXjio) ## 練習 ### Easy ### Medium ### Hard # 樹 ## 二元樹 ## 前/中/後序遍歷 ## 二元搜尋樹 ## Quick Sort ## Merge Sort ## Tree Sort ## 練習 ### Easy ### Medium ### Hard # Hash ## 意義與用途 ## 客製化雜湊方法 ## Hash Table ## 雜湊衝突解決 ## Hash Search ## Set & Map ## 練習 ### Easy ### Medium ### Hard # 平衡樹 ## 二元堆積樹(Heap) ## AVL Tree ## B-Tree 2-3樹 ## B-Tree 2-3-4樹 ## 紅黑樹 ## 練習 ### Easy ### Medium ### Hard # Graph ## 樹與圖的關係 ## 無向圖 v.s. 有向圖 ## 無環圖 v.s. 有環圖 ## 點/邊/度加權 ## 鄰接矩陣/串列 ## 練習 ### Easy ### Medium ### Hard # Dp(Dynamic Programing) ## D&C 與 Dp 關係 ## 圖與 Dp 關係 ## D A G 應用 ## 子問題定義 ## 子問題結果再利用 ## 練習 ### Easy ### Medium ### Hard