Space Complexity Calculation Techniques

Some questions will impose certain restrictions on space, how to calculate the space complexity?

We need to understand the following common sense

1 byte (byte) = 8 bit (bit) 

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

1MB refers to 1M Byte

2^{10} = 1K

2^{20} = 1M

 

Guess you like

Origin blog.csdn.net/weixin_46125998/article/details/115316867