空间复杂度计算技巧

有些题目会对空间做一定的限制,如何计算空间复杂度?

我们要了解以下常识

1 byte(字节) = 8 bit (位) 

int  4byte   /    char 1byte   /   longlong  8byte   /  float 4byte   / double 8 byte 

1MB 指 1M Byte

2^{10} = 1K

2^{20} = 1M

猜你喜欢

转载自blog.csdn.net/weixin_46125998/article/details/115316867