Structures
Structures
Which data structures are applied when dealing with a recursive function?
Re: Structures
Welcome, rash-
That's a common question, on everybody's mind lately.
If yours is regarding the blivit data structure, you'll find the inverse logarithmic recursive function applies, while the data structure of the n-th dimension requires compliance with asymmetrical contrasting cardinal grammeters.
That's a common question, on everybody's mind lately.
If yours is regarding the blivit data structure, you'll find the inverse logarithmic recursive function applies, while the data structure of the n-th dimension requires compliance with asymmetrical contrasting cardinal grammeters.
WA2RBA
-
- Posts: 1
- Joined: Sat May 04, 2019 11:48 am
- Contact:
Re: Structures
A wild guess is that you're referring to microcontrollers. In general the programming language has a concept of a 'stack', and local variables used within functions are saved to the stack every time the recursive function calls itself. So because memory is precious on microcontrollers compared to PCs then you have to tread carefully with recursion, because the stack can get full very quickly.
But then again you might not have meant this at all
But then again you might not have meant this at all
Re: Structures
Well the question is without context or detail. A recursive function is one that uses the result from one solution as the input to the next calculation and solution. Assuming this is programming code based question (and not a paper calc) The function should have a counter to define the number of recursions and at least one variable derived from the output variable of the same function. There are probably many ways to implement this in code depending on the language. A large set probably needs an array with pointer and stack offsets. I'm not a coder and this question better fits in a programming forum I think
Something like IF counter <= max value
THEN Calculate result A=A(index)+B(counter) (B is an array value)
A= Array value (index)
Return to top
Something like IF counter <= max value
THEN Calculate result A=A(index)+B(counter) (B is an array value)
A= Array value (index)
Return to top
Who is online
Users browsing this forum: Majestic-12 [Bot] and 58 guests