Finally thought I had gotten it down. All the components of a recursive algorithm were listed out and placed into a somewhat logical equation and then BOOM! I got the wrong answer lol. Now it’s back to the drawing board to try and figure out where I went wrong.
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 developed a generic formula that considers the typical components that exist in all recursive functions. It was intended to work with both simple and complex algorithms but there seems to be a mistake somewhere that I have overlooked. So now I need to walk through the examples with the formula to try and figure out what went wrong. I think it might be related to the total number of leaves calculation. That felt a bit wonky but I will check tomorrow.
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.