Questions tagged [recursive]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
51 views

Iterative vs Recursive

I have searched in many resources on web and most of them claim, that iterative way of problem solving is faster. Plus, as I understood, recursive should require more memory during processing. My ...
user avatar
  • 5
0 votes
1 answer
600 views

pset5: working, no leaks but many errors says valgrind in my recursive trie

well it works, but i keep getting many errors related to init and freeRecursive that are my recursive functions to generate and delete my trie most of my errors are related to the condition of ...
user avatar
  • 5
0 votes
1 answer
102 views

Pset 3 Recursive Binary Search problems - Always returns true

I have tried almost everything and edited my code a hundred times in search of an answer. It seems that whenever I run the program (find.c) the result always resolves to true. Not sure where the ...
user avatar
0 votes
1 answer
28 views

using return in call to recursive function

I've got a question. I'm using the unload function from my pset5 speller code as an example. I read somewhere that it is good habit to include a return in front of your call to the recursive function. ...
user avatar
0 votes
1 answer
21 views

calculations vs variables performance

In recursive scenarios, what brings more performance? Doing 3-4 simple calculations once, store result on a variable and then use variable maximum 3-4 times in each recursive function call? Or to skip ...
user avatar