File contains many different algorithms in their recursive forms; asks user for which one they would want to use and will calculate the formula for them. Utilizes thorough unit testing for the user it also can randomly run them for a random unit testing of varying values for each function.
Needed to use dynamic memory for this to ensure it being leak proof which helped teach me a lot about keeping a personal documentation on new variables and their nullptr counterparts.
The Breakdown:
This Program Outlines 5 Recursive Problems To Be Solved In C++.
This Program Assesses knowledge of recursive data structures by displaying different ways it can arise and be used. This assignment calls for 5 functions, each with their own goal; one being calculations of a unknown algorithm's sequencing to a n'th position. Secondly, having a function which calculates the amount of tennis balls needed to make a pyramid of x height. Thirdly is a conversion from base 10 integers to base 2. Fourth program checks the divisibility of a integer based on a recursive function which refrains from the usage of modulo until certain criterium are satisfied. Finally is the ramunjan calculation, which calls for you to represent the algorithm in a recursive function. These are finally used with unit test functions which check their outputs at varying values.
All These Problems Have User-Passed Values To Solve With As Well. We Use Input-Santiziation To Ensure Proper Handling Of User Data.
There Also Is Random Unit Test Function In Which Will Call Extensive Unit Tests On Each Of Our Recursive Functions To Ensure That They Handle Large Datasets As Well As Edge/Weird Cases.
This Program Taught Me A Lot More About Recursive Functions And Their Application. While I Do Enjoy Recursive Functions And Apply Them When Needbe I See Their Niche As Also Having A Stack/Runtime Trade Being Recursive Makes Them Something That Shouldn't ALWAYS Be Defaulted To As We Can Write These Functions Usually In Non-Recursive Manners With Better Runtime And Space Complexity But Usually Can Be More Of A Headache To Make Compared To Recursive Solutions.
Features:
