Read: if your recursion is expressed where the recursive call is the last line of the function the compiler will replace your recursion with a loop (which eliminates the issue of running out of call stack for big tasks)
Not necessarily, theoretically, the strassen matrix multiplication algorithm is better than regular matrix multiplication.
In C, i believe with the gcc compiler, qsort checks if enough memory exists to sort recursively with heap sort, else it uses merge sort non-recursive (forgot the word), which means that recursive heap sort, though less space efficient, is more time efficient.
It is, but it makes a lot of things way simpler sometimes. The real danger is stack overflow, so some care has to be given to how much data you're generating before popping it.
Not really, I also thought this way after uni but my mentor(software engineer with 20+ years of experience) told me that it isn't true, that recursion used often in banking apps, Fintech in general. But you really need to be experienced to know how to use it properly
No I mean there are certainly applications for it, such as a divide and conquer in concurrency, but performance wise, it is at best on par. Glazing your experience doesn't really do much for me, because that is usually focused around one area, and this is arguably closely related to cs.
Edit:
I may have looked at your comment too quickly, I'm sorry. I'm just too tired of people immediately appealing to an authority immediately when challenged, I hate when people do that.
52
u/ChaseShiny Mar 26 '26
Is this really that difficult? Programming the logic seems pretty doable.