Hello readers!
How have you guys been recently? I have been bombarded with a myriad of tests, labs, and assignments, as usual, but I'll holding up alright!
Today's blurb is on tracing recursion! As you all know, a recursive function is basically any function that is called within itself. You'll need it any time a bigger problem can be solved by solving smaller versions of a same type of problem until you get your answer to the big one. Kind of. At least that's how I see it. Anyhow, tracing recursion is not as bad as it sounds, it takes some bit of practice, of course, but all in all it will eventually click.
Tracing recursion was on the test this week went successfully I should think. The quasi-solution I came out with with involved the function we needed to trace giving the maximum length of any lists that were fed into it, including the length of the overall list. If I am correct, then my tracing would have been successful. We shall see in due time!
But that's the thing, the hardest part about tracing recursive functions (at least for me) is to be able to discern what it is the function does. Once that is figured out, you've basically got all the other pieces you need since you've traced the function in your head. All that's left is to physically write out what the function is 'thinking.'
That is my little piece for today! I hope you guys have a nice week!
Lana :)
Comments
Post a Comment