空间复杂度参考表
下方都是约等于数值,并非具体数值。
提供一些常规空间限制,其他空间限制请自行计算。
一些差不多的空间限制(如 125 125 125 MiB、 250 250 250 MiB),本表不提供大小。
数组类型 | 128 128 128 MiB | 256 256 256 MiB | 512 512 512 MiB |
---|---|---|---|
bool \operatorname {bool} bool | 1 0 9 10^9 109 | 2 × 1 0 9 2 \times 10^9 2×109 | 4 × 1 0 9 4 \times 10^9 4×109 |
char \operatorname {char} char | 1 0 9 10^9 109 | 2 × 1 0 9 2 \times 10^9 2×109 | 4 × 1 0 9 4 \times 10^9 4×109 |
short \operatorname {short} short | 6 × 1 0 8 6 \times 10^8 6×108 | 12 × 1 0 8 12 \times 10^8 12×108 | 24 × 1 0 8 24 \times 10^8 24×108 |
int \operatorname {int} int | 3 × 1 0 8 3 \times 10^8 3×108 | 6 × 1 0 8 6 \times 10^8 6×108 | 12 × 1 0 8 12 \times 10^8 12×108 |
double \operatorname {double} double | 1 0 8 10^8 108 | 2 × 1 0 8 2 \times 10^8 2×108 | 4 × 1 0 8 4 \times 10^8 4×108 |
long \operatorname {long} long long \operatorname {long} long | 1 0 8 10^8 108 | 2 × 1 0 8 2 \times 10^8 2×108 | 4 × 1 0 8 4 \times 10^8 4×108 |