You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a number of instances where it may be clearer to express your algorithm via recursion, especially tail recursion, but unfortunately all recursion in C# currently requires O(n) space for just the call stack, meaning that your algorithm cannot take less than O(n) space.
It is proposed that C# provide a new statement form and a new expression form to allow tail-recursive calls to consume O(1) space.
Design meetings
The text was updated successfully, but these errors were encountered:
tail return
recursive callsSummary
There are a number of instances where it may be clearer to express your algorithm via recursion, especially tail recursion, but unfortunately all recursion in C# currently requires O(n) space for just the call stack, meaning that your algorithm cannot take less than O(n) space.
It is proposed that C# provide a new statement form and a new expression form to allow tail-recursive calls to consume O(1) space.
Design meetings
The text was updated successfully, but these errors were encountered: