Hello 算法 1.2.0 繁体中文 Dart 版// === File: recursion.dart === /* 使用迭代模擬遞迴 */ int forLoopRecur(int n) { // 使用一個顯式的堆疊來模擬系統呼叫堆疊 Liststack = []; int res = 0; // 遞:遞迴呼叫 for (int i = n; i > 0; i--) { // 透過“入堆疊操作”模擬“遞” stack (?) ,其中 ? 為陣列或鏈結串列的長度: // === File: time_complexity.dart === /* 線性階(走訪陣列) */ int arrayTraversal(List nums) { int count = 0; // 迴圈次數與陣列長度成正比 for (var _num in nums) { count++; } return count; 此時間複雜度為 ?((? − 1)?/2) = ?(?2) : // === File: time_complexity.dart === /* 平方階(泡沫排序) */ int bubbleSort(List nums) { int count = 0; // 計數器 // 外迴圈:未排序區間為 [0, i] for (var i = nums.length - 1; i > 0; i--) 0 码力 | 378 页 | 18.77 MB | 10 月前3
Hello 算法 1.2.0 繁体中文 Python 版走訪陣列和走訪鏈結串列等操作的時間複雜度均為 ?(?) ,其中 ? 為陣列或鏈結串列的長度: # === File: time_complexity.py === def array_traversal(nums: list[int]) -> int: """ 線性階(走訪陣列)""" count = 0 # 迴圈次數與陣列長度成正比 for num in nums: count += 1 return count /2 次,因 此時間複雜度為 ?((? − 1)?/2) = ?(?2) : # === File: time_complexity.py === def bubble_sort(nums: list[int]) -> int: """ 平方階(泡沫排序)""" count = 0 # 計數器 # 外迴圈:未排序區間為 [0, i] for i in range(len(nums) - int) -> list[int]: """ 生成一個陣列,元素為: 1, 2, ..., n ,順序被打亂""" # 生成陣列 nums =: 1, 2, 3, ..., n nums = [i for i in range(1, n + 1)] # 隨機打亂陣列元素 random.shuffle(nums) return nums def find_one(nums: list[int])0 码力 | 364 页 | 18.74 MB | 10 月前3
Hello 算法 1.2.0 繁体中文 C# 版*/ void Linear(int n) { // 長度為 n 的陣列佔用 O(n) 空間 int[] nums = new int[n]; // 長度為 n 的串列佔用 O(n) 空間 Listnodes = []; for (int i = 0; i < n; i++) { nodes.Add(new ListNode(i)); } // 長度為 n 的雜湊表佔用 O(n^2) 空間 int[,] numMatrix = new int[n, n]; // 二維串列佔用 O(n^2) 空間 List<List > numList = []; for (int i = 0; i < n; i++) { List tmp = []; for (int j = 0; j < n; j++) { tmp.Add(0); } numList 間可能散落在記憶體各 處。我們知道,儲存陣列的記憶體空間必須是連續的,而當陣列非常大時,記憶體可能無法提供如此大的連 續空間。此時鏈結串列的靈活性優勢就體現出來了。 鏈結串列(linked list)是一種線性資料結構,其中的每個元素都是一個節點物件,各個節點透過“引用”相 連線。引用記錄了下一個節點的記憶體位址,透過它可以從當前節點訪問到下一個節點。 第 4 章 陣列與鏈結串列 www 0 码力 | 379 页 | 18.79 MB | 10 月前3
Hello 算法 1.2.0 繁体中文 Java 版*/ void linear(int n) { // 長度為 n 的陣列佔用 O(n) 空間 int[] nums = new int[n]; // 長度為 n 的串列佔用 O(n) 空間 Listnodes = new ArrayList<>(); for (int i = 0; i < n; i++) { nodes.add(new ListNode(i)); int[][] numMatrix = new int[n][n]; // 二維串列佔用 O(n^2) 空間 List<List > numList = new ArrayList<>(); for (int i = 0; i < n; i++) { List tmp = new ArrayList<>(); for (int j = 0; j < n; 間可能散落在記憶體各 處。我們知道,儲存陣列的記憶體空間必須是連續的,而當陣列非常大時,記憶體可能無法提供如此大的連 續空間。此時鏈結串列的靈活性優勢就體現出來了。 鏈結串列(linked list)是一種線性資料結構,其中的每個元素都是一個節點物件,各個節點透過“引用”相 連線。引用記錄了下一個節點的記憶體位址,透過它可以從當前節點訪問到下一個節點。 第 4 章 陣列與鏈結串列 www 0 码力 | 379 页 | 18.79 MB | 10 月前3
Blender v3.4 参考手册(繁体中文版)creation workflow. It boasts active community support. See blender.org/community for an extensive list of sites. It has a small executable, which is optionally portable. You can download the latest version which both systems support such as Hi-DPI, 3D-mouse, tablet input, ... etc. have been left out of this list. *1 In X11 fast cursor motion may exit the window bounds while the cursor is grabbed (transforming also See Preferences for a complete list of options. 介紹 Here are some preferences that you may wish to set initially. See the section Preferences for the complete list of available settings. Language0 码力 | 4469 页 | 258.38 MB | 1 年前3
Blender v3.2 参考手册(繁体中文版)creation workflow. It boasts active community support. See blender.org/community for an extensive list of sites. It has a small executable, which is optionally portable. You can download the latest version also See Preferences for a complete list of options. 介紹 Here are some preferences that you may wish to set initially. See the section Preferences for the complete list of available settings. Language always be changed later in the Preferences. Language The language used in the user interface. The list is broken up into categories determining how complete the translations are. More language preferences0 码力 | 4355 页 | 255.63 MB | 1 年前3
Blender v4.0 参考手册(繁体中文版)creation workflow. It boasts active community support. See blender.org/community for an extensive list of sites. It has a small executable, which is optionally portable. You can download the latest version which both systems support such as Hi-DPI, 3D-mouse, tablet input, ... etc. have been left out of this list. *1 In X11 fast cursor motion may exit the window bounds while the cursor is grabbed (transforming also See Preferences for a complete list of options. 介紹 Here are some preferences that you may wish to set initially. See the section Preferences for the complete list of available settings. Language0 码力 | 5220 页 | 303.08 MB | 1 年前3
Blender v3.1 参考手册(繁体中文版)creation workflow. It boasts active community support, see blender.org/community for an extensive list of sites. It has a small executable, which is optionally portable. You can download the latest version Settings See also See Preferences for a complete list of options. 介紹 Here are some preferences that you may wish to set initially. The full list and explanation of the Preferences are documented in changed later in the Preferences. Language The language used for translating the user interface. The list is broken up into categories determining how complete the translations are. More language preferences0 码力 | 4393 页 | 256.31 MB | 1 年前3
Blender v3.3 参考手册(繁体中文版)creation workflow. It boasts active community support. See blender.org/community for an extensive list of sites. It has a small executable, which is optionally portable. You can download the latest version also See Preferences for a complete list of options. 介紹 Here are some preferences that you may wish to set initially. See the section Preferences for the complete list of available settings. Language always be changed later in the Preferences. Language The language used in the user interface. The list is broken up into categories determining how complete the translations are. More language preferences0 码力 | 4464 页 | 259.55 MB | 1 年前3
Blender v2.92 参考手册(繁体中文版)creation workflow. It boasts active community support, see blender.org/community for an extensive list of sites. It has a small executable, which is optionally portable. You can download the latest version Settings See also See Preferences for a complete list of options. 介紹 Here are some preferences that you may wish to set initially. The full list and explanation of the Preferences are documented in changed later in the Preferences. Language The language used for translating the user interface. The list is broken up into categories determining how complete the translations are. More language preferences0 码力 | 3966 页 | 203.00 MB | 1 年前3
共 36 条
- 1
- 2
- 3
- 4













