Hello 算法 1.2.0 繁体中文 Go 版_ = make([]int, n) // 長度為 n 的串列佔用 O(n) 空間 var nodes []*node for i := 0; i < n; i++ { nodes = append(nodes, newNode(i)) } // 長度為 n 的雜湊表佔用 O(n) 空間 第 2 章 複雜度分析 www.hello‑algo.com 46 m := make(map[int]string */ nums = append(nums, 1) nums = append(nums, 3) nums = append(nums, 2) nums = append(nums, 5) nums = append(nums, 4) /* 在中間插入元素 */ 第 4 章 陣列與鏈結串列 www.hello‑algo.com 81 nums = append(nums[:3], append([]int{6} append([]int{6}, nums[3:]...)...) // 在索引 3 處插入數字 6 /* 刪除元素 */ nums = append(nums[:3], nums[4:]...) // 刪除索引 3 處的元素 4. 走訪串列 與陣列一樣,串列可以根據索引走訪,也可以直接走訪各元素。 // === File: list_test.go === /* 透過索引走訪串列 */0 码力 | 385 页 | 18.80 MB | 10 月前3
Hello 算法 1.2.0 繁体中文 Python 版使用一個顯式的堆疊來模擬系統呼叫堆疊 stack = [] res = 0 # 遞:遞迴呼叫 for i in range(n, 0, -1): # 透過“入堆疊操作”模擬“遞” stack.append(i) # 迴:返回結果 while stack: # 透過“出堆疊操作”模擬“迴” res += stack.pop() # res = 1+2+3+...+n return res 。 # === File: list.py === # 清空串列 nums.clear() # 在尾部新增元素 nums.append(1) nums.append(3) nums.append(2) nums.append(5) nums.append(4) # 在中間插入元素 nums.insert(3, 6) # 在索引 3 處插入數字 6 # 刪除元素 nums.pop(3) 沒有內建的堆疊類別,可以把 list 當作堆疊來使用 stack: list[int] = [] # 元素入堆疊 stack.append(1) stack.append(3) stack.append(2) stack.append(5) stack.append(4) # 訪問堆疊頂元素 peek: int = stack[-1] # 元素出堆疊 pop: int = stack0 码力 | 364 页 | 18.74 MB | 10 月前3
Hello 算法 1.2.0 繁体中文 Swift 版迴圈 i = 1, 2, ..., n-1, n for i in 1 ... n { // 迴圈 j = 1, 2, ..., n-1, n for j in 1 ... n { res.append("(\(i), \(j)), ") } } return res } 圖 2‑2 是該巢狀迴圈的流程框圖。 第 2 章 複雜度分析 www.hello‑algo.com 22 圖 stack: [Int] = [] var res = 0 // 遞:遞迴呼叫 for i in (1 ... n).reversed() { // 透過“入堆疊操作”模擬“遞” stack.append(i) } // 迴:返回結果 while !stack.isEmpty { // 透過“出堆疊操作”模擬“迴” res += stack.removeLast() } // res list.swift === /* 清空串列 */ nums.removeAll() /* 在尾部新增元素 */ nums.append(1) nums.append(3) nums.append(2) nums.append(5) nums.append(4) /* 在中間插入元素 */ nums.insert(6, at: 3) // 在索引 3 處插入數字 6 /* 刪除元素0 码力 | 379 页 | 18.79 MB | 10 月前3
Blender v4.0 参考手册(繁体中文版)data is only possible in the external library. Link and Append are used to load in only selected parts from another file. See Linked Libraries. Append... Appends data from an external blend-file to the current name of the selected data-block. If a name is already in use by a different data-block, Blender will append a number like ".001". User Count Displays the number of users of the data (if there's more than different one. It's also possible to import node groups from a different blend-file using File ‣ Link/Append. Frame Node The Frame node is useful for organizing nodes by collecting related nodes together0 码力 | 5220 页 | 303.08 MB | 1 年前3
julia 1.10.10Handle excess argument diversity in the caller . . . . . . . . . . . . . . . . . . . . 450 36.5 Append ! to names of functions that modify their arguments . . . . . . . . . . . . . 450 36.6 Avoid strange with • params::Dict: all the keyword arguments passed to addprocs • launched::Array: the array to append one or more WorkerConfig objects to • c::Condition: the condition variable to be notified as and list are com- piler specific, where compiler vendors usually default to using Csize_t as type and append the hidden arguments at the end of the argument list. While this behaviour is fixed for some com-0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.9Handle excess argument diversity in the caller . . . . . . . . . . . . . . . . . . . . 450 36.5 Append ! to names of functions that modify their arguments . . . . . . . . . . . . . 450 36.6 Avoid strange with • params::Dict: all the keyword arguments passed to addprocs • launched::Array: the array to append one or more WorkerConfig objects to • c::Condition: the condition variable to be notified as and list are com- piler specific, where compiler vendors usually default to using Csize_t as type and append the hidden arguments at the end of the argument list. While this behaviour is fixed for some com-0 码力 | 1692 页 | 6.34 MB | 3 月前3
Blender v3.6 参考手册(繁体中文版)data is only possible in the external library. Link and Append are used to load in only selected parts from another file. See Linked Libraries. Append... Appends data from an external blend-file to the current name of the selected data-block. If a name is already in use by a different data-block, Blender will append a number like ".001". User Count Displays the number of users of the data (if there's more than different one. It's also possible to import node groups from a different blend-file using File ‣ Link/Append. Frame Node The Frame node is useful for organizing nodes by collecting related nodes together0 码力 | 4744 页 | 297.98 MB | 1 年前3
Blender v3.5 参考手册(繁体中文版)data is only possible in the external library. Link and Append are used to load in only selected parts from another file. See Linked Libraries. Append... Appends data from an external blend-file to the current name of the selected data-block. If a name is already in use by a different data-block, Blender will append a number like ".001". User Count Displays the number of users of the data (if there's more than different one. It's also possible to import node groups from a different blend-file using File ‣ Link/Append. Frame Node The Frame node is useful for organizing nodes by collecting related nodes together0 码力 | 4704 页 | 295.98 MB | 1 年前3
Blender v3.1 参考手册(繁体中文版)data is only possible in the external library. Link and Append are used to load in only selected parts from another file. See Linked Libraries. Append... Appends data from an external blend-file to the of same type to have same ID (same name). If Data ID is already in use, Blender will automatically append a number to the end to prevent ID collision (for example "Cube.001"). A Data ID field. Menus showing Group Input and a single Group Output node. Appending Node Groups Reference Topbar File ‣ Link/Append Once you have appended a Node Tree to your blend-file, you can make use of it in a node editor by0 码力 | 4393 页 | 256.31 MB | 1 年前3
Blender v3.4 参考手册(繁体中文版)data is only possible in the external library. Link and Append are used to load in only selected parts from another file. See Linked Libraries. Append... Appends data from an external blend-file to the current name of the selected data-block. If a name is already in use by a different data-block, Blender will append a number like ".001". User Count Displays the number of users of the data (if there's more than different one. It's also possible to import node groups from a different blend-file using File ‣ Link/Append. Frame Node The Frame node is useful for organizing nodes by collecting related nodes together0 码力 | 4469 页 | 258.38 MB | 1 年前3
共 28 条
- 1
- 2
- 3













