# HomeWork
###### tags: dataStracture
## Write-up
[big-O Note ](/e9ChynKNQvmbuPawjj9cpw)
## Implement
Libraries
> numpy
> matplotlib
Source Code
https://colab.research.google.com/drive/12PS-XTzZnWRP0kpembKDaczcBr7wDni6?usp=sharing
---
liner

log n

n**2

n**3

nlogn

[Reference link](https://sites.google.com/site/zsgititit/home/python-cheng-shi-she-ji/shi-yongpython-hui-zhi-yan-suan-fa-cheng-zhang-qu-shi-tu)
```
import math
import numpy as np
import matplotlib.pyplot as plt
n = np.arange(1, 100, 1)
y = [math.factorial(i) for i in n]
plt.plot(n, y, label="O(n!)")
y = [math.pow(2, i) for i in n]
plt.plot(n, y , label="O(2**n)")
y = [i*i*i for i in n]
plt.plot(n, y, label="O(n**3)")
y = [i*i for i in n]
plt.plot(n, y, label="O(n**2)")
y = [i*np.log(i) for i in n]
plt.plot(n, y, label="O(n*log(n))")
y = n
plt.plot(n, y, label="O(n)")
y = [np.log(i) for i in n]
plt.plot(n, y, 'r', label="O(log(n))")
plt.legend()
plt.ylim(0, 5000)
plt.show()
```

> [name=侯智晟]