You have to calculate everything by yourself. Using computers to code and solve is not permitted.
If you still don't understand try to check the code for some values by hand or on your machine and print the entire L array or the P array for more insight.
Feel free to contact me for further help or clarific...
Wouldn't the complexity of this solution be more than O(n^2) ?
I recently started following this list but got to know about this new course: Introduction to Machine Learning offered by Google. This course seems to be quite basic than this list. So how does this list compare to the Google Machine Learning course's difficulty ? Should I begin with this list and then move to the other course or vice versa or should I follow both courses in tandem ?
Thanks in advance.