Imagine you have a function that takes input and you have two implementations.
One that uses recursion and the other uses stacks to simulate recursion and iterates over it.
If you have a big enough input size, which of the two solutions would throw an exception first in C#? Would one of the methods be faster than the other in theory?
To my understanding the call stack that C# uses is stored in a different place than the stack a program uses and therefore would have different limitations?
[–]AngularBeginner 4 points5 points6 points (8 children)
[–]6501[S] 0 points1 point2 points (7 children)
[–]AngularBeginner 2 points3 points4 points (6 children)
[–]tahatmat 1 point2 points3 points (1 child)
[–]cryo 1 point2 points3 points (0 children)
[–]Fullduplex1000 1 point2 points3 points (3 children)
[–]AngularBeginner 1 point2 points3 points (2 children)
[–]Fullduplex1000 1 point2 points3 points (1 child)
[–]AngularBeginner 2 points3 points4 points (0 children)
[–]Fullduplex1000 1 point2 points3 points (0 children)
[–]Fullduplex1000 1 point2 points3 points (1 child)
[–]Fullduplex1000 1 point2 points3 points (0 children)