To answer my question, “What are the components found in all recursive algorithms?” I decided to compare two of the previous recursive functions found in the book. One function was simple and it’s time complexity could be calculated using the generic formula O(branches^depth)
. The other function was very complicated and had to be solved using a different approach. I hope that by comparing them I can somehow determine what are the key terms and values needed to determine the time complexity of any recursive algorithm.
TLDR;
Okay, so here are the highlights of what I did:
- Still reading through the book “Cracking the Coding Interview” by Gayle Laakmann McDowell. I worked on comparing two recursive functions mentioned in the book. One function was simple and the other was complex. I am hoping to find similarities between the two that can be formulated into a generic formula or guide to solving any recursive algorithm. The generic format provided in the book (
O(branches^depth)
) leaves me with a lot of questions which is why I am trying to figure this out on my own.
Conclusion
That’s all for today. This is my sixth round of the “#100daysofcode” challenge. I will be continuing my work from round five into round six. I am currently working through the book “Cracking the Coding Interview” by Gayle Laakmann McDowell. My goal is to become more familiar with algorithms and data structures. This goal was derived from my goal to better understand operating systems and key programs that I use in the terminal regularly e.g. Git. This goal was in term derived from my desire to better understand the fundamental tools used for coding outside of popular GUIs. This in turn was derived from my desire to be a better back-end developer.
I have no idea if my path is correct but I am walking down this road anyways. Worst case scenario I learn a whole bunch of stuff that will help me out on my own personal projects.