Content deleted Content added
m Maintain {{WPBS}} and vital articles: 1 WikiProject template. Create {{WPBS}}. Keep majority rating "Start" in {{WPBS}}. Remove 1 same rating as {{WPBS}} in {{WikiProject Computer Science}}. Tag: |
→Recursion: {{unsigned}} |
||
Line 13:
:Is this algorithm recursive? Will it copy objects referred to by something referred to by something referenced from the stack? If so, it is not described that way. -- [[User:Beland|Beland]] 17:19, 24 May 2007 (UTC)
:: It isn't strictly recursive, but it does reach all the objects referenced even indirectly from the stack. Essentially, the stack and the heap both act as components of a queue, with you adding to the end of the heap any copied items, then forwarding the pointer in the queue. This results in a breadth-first approach to reaching all the items, since you won't reach the 'end' of the heap/queue until no more objects require copying and no more pointers require forwarding.. {{unsigned|66.75.233.189|01:53, 8 May 2008}}
::: The algorithm as shown is totally recursive (see the recursive call to copy(r)), and performs a ''depth'' first search. I believe this is an error in the article. The pseudocode should be updated to match your description. <small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/86.66.40.164|86.66.40.164]] ([[User talk:86.66.40.164|talk]]) 13:50, 20 April 2016 (UTC)</small><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
|