Started on the examples and got stuck at number 3. The example involved a nested loop but the iteration was always one less than the loop it’s nested inside. I tried to pull out the pen and paper to derive the runtime but I got a bit confused. Surely we should just be adding all the values together manually. I thought there had to be a better way and I was correct. The book demonstrates one method of deriving the runtime for the function. After reading through it I still felt a bit confused so I went to the back of the book.
TLDR;
Okay, so here are the highlights of what I did:
- I continued reading through the book “Cracking the Coding Interview” by Gayle Laakmann McDowell. I am working through the examples. This time around I am trying to derive the runtimes on my own before reading the answer. It started off easy but now i need to go through the logic of the “Sum of Integers“. I am confident I have studied this before but I guess I need to review.
- Made my account and started my first module on the Microsoft learning platform. Hopefully it goes well. It seems like there is a bit of a learning curve for me to understand how the system works. But free learning content seems cool. I guess I need to build a new section in my notes lol.
Conclusion
That’s all for today. If you are interested in the MIT course you can check out the video lecture I’m currently going through. The lecture is helpful but isn’t sufficient by itself. Anyways, until next time PEACE!