Update rod_cutting.py (#995)
Update rod_cutting.py (#995)

* Update rod_cutting.py

A hopefully clearer implementation without dependence on global variables.

* Update rod_cutting.py

added doctests

* Update rod_cutting.py

* Update rod_cutting.py

TheAlgorithms/Python