Day 12: Setting Recursion Limit to Test Depth

Whether it’s important or not I really need to know what in the hell does “depth” mean? I found out how to set recursion limits in python so I thought to use that to determine what the depth is for a simple recursive algorithm… Or so I thought. I ran into some problems since I seems like there is more to do it than a single function’s recursive calls.

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 tried to determine what “depth” evaluates to in recursive algorithms. I am trying to determine if the initial function call is included in the depth calculation or if it only applies to all the following calls after the initial one. I tried writing a simple Python program to test this out but I seem to have run into problems. Other statements in the function seem to be adding to the call stack and tripping the Recursion set much earlier than I expected. I need to test this a bit more to understand how the recursion is being considered. Sigh… This rabbit hole is just getting deeper and deeper LOL.

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.