Skip to content

Latest commit

 

History

History
30 lines (14 loc) · 601 Bytes

程序复杂度分析.md

File metadata and controls

30 lines (14 loc) · 601 Bytes

程序复杂度分析

时间复杂度

image-20211017170243393

空间复杂度

1 byte = 8 bit

其中byte是字节,bit是位。

int/float 是 4个byte 也就是32位。

long long/double 8字节,也就是64位。

对于

64 MB(我们用B表示byte,用b表示bit)就是64兆byte。

1 M 大概2^20^

而2^20^ 大概是10^6^

所以综上是6.4*10^7^ byte

能开1.6*10^7^ 个int,此外程序本身占用少量空间(能用到60 MB),所以不要太接近极限空间。