Results of 1 - 10 of about 120 for K (0.006 sec.)
- Time complexity of operations on built-in types — Python 3.14.8 ドキュメント 12865
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python built-ins reference » Time complexity of operations on built-in types テーマ 自動 ライト ダーク | Time complexity of operations on built-in types ¶ This p
...ows with the size of its inputs. Unless stated otherwise, n denotes the number of elements currently in the container, and k is the value of a numeric parameter, such as an index or a repeat count. list ¶ Lists are mutable sequences; for more deta...sing a collections.deque instead. 演算 Complexity Copy ( l.copy() ) O ( n ) Append ( l.append(x) ) [ 1 ] O (1) Pop ( l.pop(k) ) [ 1 ] [ 2 ] O ( n - k ) Insert ( l.insert(k, x) ) [ 1 ] [ 2 ] O ( n - k ) Get item ( l[k] ) O (1) Set item ( l[k] = x )...O (1) Delete item ( del l[k] ) [ 2 ] O ( n - k ) イテレーション O ( n ) Get slice ( l[i:j] ) O ( j - i ) Set slice ( l[i:j] = t ) [ 1 ] O ( j - i ) if... - https://man.mtool.work/python/3.14/builtins/time-complexity.html
- Time complexity of operations on built-in types — Python 3.14.8 ドキュメント 12865
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python built-ins reference » Time complexity of operations on built-in types テーマ 自動 ライト ダーク | Time complexity of operations on built-in types ¶ This p
...ows with the size of its inputs. Unless stated otherwise, n denotes the number of elements currently in the container, and k is the value of a numeric parameter, such as an index or a repeat count. list ¶ Lists are mutable sequences; for more deta...sing a collections.deque instead. 演算 Complexity Copy ( l.copy() ) O ( n ) Append ( l.append(x) ) [ 1 ] O (1) Pop ( l.pop(k) ) [ 1 ] [ 2 ] O ( n - k ) Insert ( l.insert(k, x) ) [ 1 ] [ 2 ] O ( n - k ) Get item ( l[k] ) O (1) Set item ( l[k] = x )...O (1) Delete item ( del l[k] ) [ 2 ] O ( n - k ) イテレーション O ( n ) Get slice ( l[i:j] ) O ( j - i ) Set slice ( l[i:j] = t ) [ 1 ] O ( j - i ) if... - https://man.mtool.work/python/3.14/builtins/time-complexity.html
- heapq --- ヒープキューアルゴリズム — Python 3.14.8 ドキュメント 9847
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » heapq --- ヒープキューアルゴリズム テーマ 自動 ライト ダーク | heapq --- ヒープキューアルゴリズム ¶ ソースコード: Lib/he
...s children. We refer to this condition as the heap invariant. For min-heaps, this implementation uses lists for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k for which the compared elements exist. Elements are counted from zero...ariant: every parent node has a value greater than any of its children. These are implemented as lists for which maxheap[2*k+1] <= maxheap[k] and maxheap[2*k+2] <= maxheap[k] for all k for which the compared elements exist. The root, maxheap[0] ,...contains the largest element; heap.sort(reverse=True) maintains the max-heap invariant. The heapq API differs from textbook heap algorithms in two aspects: (a) We use zero-based indexing. This makes the relationship between the index for a node a... - https://man.mtool.work/python/3.14/library/heapq.html
- heapq --- ヒープキューアルゴリズム — Python 3.14.8 ドキュメント 9847
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » heapq --- ヒープキューアルゴリズム テーマ 自動 ライト ダーク | heapq --- ヒープキューアルゴリズム ¶ ソースコード: Lib/he
...s children. We refer to this condition as the heap invariant. For min-heaps, this implementation uses lists for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k for which the compared elements exist. Elements are counted from zero...ariant: every parent node has a value greater than any of its children. These are implemented as lists for which maxheap[2*k+1] <= maxheap[k] and maxheap[2*k+2] <= maxheap[k] for all k for which the compared elements exist. The root, maxheap[0] ,...contains the largest element; heap.sort(reverse=True) maintains the max-heap invariant. The heapq API differs from textbook heap algorithms in two aspects: (a) We use zero-based indexing. This makes the relationship between the index for a node a... - https://man.mtool.work/python/3.14/library/heapq.html
- math --- 数学関数 — Python 3.14.8 ドキュメント 9015
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » math --- 数学関数 テーマ 自動 ライト ダーク | math --- 数学関数 ¶ This module provides access to common math
...は次の関数を提供しています。明示的な注記のない限り、戻り値は全て浮動小数点数になります。 Number-theoretic functions comb(n, k) Number of ways to choose k items from n items without repetition and without order factorial(n) n の階乗 gcd(*integers) 整...rt(n) Integer square root of a nonnegative integer n lcm(*integers) Least common multiple of the integer arguments perm(n, k) Number of ways to choose k items from n items without repetition and with order Floating point arithmetic ceil(x) Ceiling...Magnitude (absolute value) of x with the sign of y frexp(x) Mantissa and exponent of x isclose(a, b, rel_tol, abs_tol) Check if the values a and b are close to each other isfinite(x) Check if x is neither an infinity nor a NaN isinf(x) Check if x... - https://man.mtool.work/python/3.14/library/math.html
- math --- 数学関数 — Python 3.14.8 ドキュメント 9015
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » math --- 数学関数 テーマ 自動 ライト ダーク | math --- 数学関数 ¶ This module provides access to common math
...は次の関数を提供しています。明示的な注記のない限り、戻り値は全て浮動小数点数になります。 Number-theoretic functions comb(n, k) Number of ways to choose k items from n items without repetition and without order factorial(n) n の階乗 gcd(*integers) 整...rt(n) Integer square root of a nonnegative integer n lcm(*integers) Least common multiple of the integer arguments perm(n, k) Number of ways to choose k items from n items without repetition and with order Floating point arithmetic ceil(x) Ceiling...Magnitude (absolute value) of x with the sign of y frexp(x) Mantissa and exponent of x isclose(a, b, rel_tol, abs_tol) Check if the values a and b are close to each other isfinite(x) Check if x is neither an infinity nor a NaN isinf(x) Check if x... - https://man.mtool.work/python/3.14/library/math.html
- random --- 疑似乱数を生成する — Python 3.14.8 ドキュメント 8804
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » random --- 疑似乱数を生成する テーマ 自動 ライト ダーク | random --- 疑似乱数を生成する ¶ ソースコード: Lib/
...om may encounter contention and poor performance. Consider using separate instances of Random per thread instead. 保守 (bookkeeping) 関数 ¶ random. seed ( a = None , version = 2 ) ¶ 乱数生成器を初期化します。 a が省略されるか None の場合、現在のシ...ンダムなバイト列を生成します。 セキュリティトークンを生成する目的で、このメソッドを使用しないでください。代わりに secrets.token_bytes() を使用してください。 Added in version 3.9. 整数用の関数 ¶ random. randrange ( stop ) ¶ random. randrange ( start...supports arbitrarily large ranges and is optimized for common cases. 位置引数のパターンは range() 関数の引数と一致します。 Keyword arguments should not be used because they can be interpreted in unexpected ways. For example randrange(start=100) is... - https://man.mtool.work/python/3.14/library/random.html
- random --- 疑似乱数を生成する — Python 3.14.8 ドキュメント 8804
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 数値と数学モジュール » random --- 疑似乱数を生成する テーマ 自動 ライト ダーク | random --- 疑似乱数を生成する ¶ ソースコード: Lib/
...om may encounter contention and poor performance. Consider using separate instances of Random per thread instead. 保守 (bookkeeping) 関数 ¶ random. seed ( a = None , version = 2 ) ¶ 乱数生成器を初期化します。 a が省略されるか None の場合、現在のシ...ンダムなバイト列を生成します。 セキュリティトークンを生成する目的で、このメソッドを使用しないでください。代わりに secrets.token_bytes() を使用してください。 Added in version 3.9. 整数用の関数 ¶ random. randrange ( stop ) ¶ random. randrange ( start...supports arbitrarily large ranges and is optimized for common cases. 位置引数のパターンは range() 関数の引数と一致します。 Keyword arguments should not be used because they can be interpreted in unexpected ways. For example randrange(start=100) is... - https://man.mtool.work/python/3.14/library/random.html
- collections --- コンテナデータ型 — Python 3.14.8 ドキュメント 8245
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » collections --- コンテナデータ型 テーマ 自動 ライト ダーク | collections --- コンテナデータ型 ¶ ソースコード: Lib/collec
...グが探される順番を変更できます。このリストは常に一つ以上のマッピングを含んでいなければなりません。 new_child ( m = None , ** kwargs ) ¶ 新しいマッピングに現在のインスタンスが持つ全てのマッピングを追加したものを持つ新しい ChainMap インスタンスを返しま...は、チェーンされたマッピングを扱う様々な手法を示します。 Python の内部探索チェーンをシミュレートする例: import builtins pylookup = ChainMap ( locals (), globals (), vars ( builtins )) ユーザ指定のコマンドライン引数、環境変数、デフォルト値、の順に優先...nt ( '-u' , '--user' ) parser . add_argument ( '-c' , '--color' ) namespace = parser . parse_args () command_line_args = { k : v for k , v in vars ( namespace ) . items () if v is not None } combined = ChainMap ( command_line_args , os . environ ,... - https://man.mtool.work/python/3.14/library/collections.html
- collections --- コンテナデータ型 — Python 3.14.8 ドキュメント 8245
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » データ型 » collections --- コンテナデータ型 テーマ 自動 ライト ダーク | collections --- コンテナデータ型 ¶ ソースコード: Lib/collec
...グが探される順番を変更できます。このリストは常に一つ以上のマッピングを含んでいなければなりません。 new_child ( m = None , ** kwargs ) ¶ 新しいマッピングに現在のインスタンスが持つ全てのマッピングを追加したものを持つ新しい ChainMap インスタンスを返しま...は、チェーンされたマッピングを扱う様々な手法を示します。 Python の内部探索チェーンをシミュレートする例: import builtins pylookup = ChainMap ( locals (), globals (), vars ( builtins )) ユーザ指定のコマンドライン引数、環境変数、デフォルト値、の順に優先...nt ( '-u' , '--user' ) parser . add_argument ( '-c' , '--color' ) namespace = parser . parse_args () command_line_args = { k : v for k , v in vars ( namespace ) . items () if v is not None } combined = ChainMap ( command_line_args , os . environ ,... - https://man.mtool.work/python/3.14/library/collections.html