処理 | 計算量 |
メソッド |
Add | Count ⇐ 容量 O(1)に近い
Count > 容量 O(n) - 自動拡張の為 |
Clear | O(n) |
ContainsKey | O(1)に近い |
ContainsValue | O(n) |
Remove | O(1)に近い |
プロパティ |
Count | O(1) |
Item | O(1)に近い |
処理 | 計算量 |
メソッド |
Add | Count ⇐ 容量 O(1)に近い
Count > 容量 O(n) - 自動拡張の為 |
Clear | O(n) |
Contains | O(1) |
Remove | O(1) |
プロパティ |
Count | O(1) |
処理 | 計算量 |
メソッド |
AddAfter、AddBefore、AddFirst、AddLast | O(1) |
Clear | O(n) |
Contains | O(n) |
Find | O(n) |
FindLast | O(n) |
Remove | O(n) |
RemoveFirst、RemoveLast | O(1) |
プロパティ |
Count、First、Last | O(1) |
処理 | 計算量 |
メソッド |
Add | Count ⇐ 容量 O(1)
Count > 容量 O(n) - 自動拡張の為 |
AddRange | Count ⇐ 容量 O(n)
Count > 容量 O(n + m) - 自動拡張の為 |
Clear | O(n) |
Contains | O(n) |
Exists | O(n) |
Find、FindAll、FindIndex、FindIndex、FindLastIndex | O(n) |
GetRange | O(n) |
IndexOf | O(n) |
Insert | O(n) |
InsertRange | O(n + m) |
LastIndexOf | O(n) |
Remove、RemoveAll、RemoveAt、RemoveRange | O(n) |
Reverse | O(n) |
Sort | O(n log n) |
プロパティ |
Count | O(1) |
Item | O(1) |
処理 | 計算量 |
メソッド |
Clear | O(n) |
Contains | O(n) |
Dequeue | O(1) |
Enqueue | O(n) |
Peek | O(1) |
TrimExcess | O(n) |
プロパティ |
Count | O(1) |
処理 | 計算量 |
メソッド |
Add | O(log n) |
Clear | O(1) |
ContainsKey | O(log n) |
ContainsValue | O(n) |
Remove | O(log n) |
TryGetValue | O(log n) |
プロパティ |
Count | O(1) |
Item | 取得: O(log n)
設定: O(log n) |
処理 | 計算量 |
メソッド |
Add | 未ソートデータ追加: O(n)
ソートデータ追加: O(log n)
Count > 容量: O(n) - 自動拡張の為 |
Clear | O(n) |
ContainsKey | O(log n) |
ContainsValue | O(n) |
IndexOfKey | O(log n) |
IndexOfValue | O(n) |
Remove | O(n) |
RemoveAt | O(n) |
TrimExcess | O(n) |
TryGetValue | O(log n) |
プロパティ |
Count | O(1) |
Item | 取得: O(log n)
設定: O(log n)
未ソートデータ追加: O(n)
ソートデータ追加: O(log n)
Count > 容量(追加): O(n) - 自動拡張の為 |
処理 | 計算量 |
メソッド |
Clear | O(n) |
Contains | O(n) |
Peek | O(1) |
Pop | O(1) |
Push | O(1) |
TrimExcess | O(n) |
プロパティ |
Count | O(1) |
処理 | 計算量 |
メソッド |
Add | O(1) |
Clear | O(n) |
ContainsKey | O(1) |
ContainsValue | O(n) |
CopyTo | O(n) |
GetEnumerator | O(1) |
Remove | O(1) |
プロパティ |
Count | O(1) |
Item | O(1) |
Keys | O(1) |
Values | O(1) |