page_list webwalk( page_list start_page ) { page_list foundpages = start_page; page_list explored_pages; while ( foundpages != empty_list ) { any_page = pick any of foundpages; newpage = explore(any_page); if (newpage == NULL) { foundpages -= any_page; explored_pages += any_page; } else { foundpages += newpage; } } return explored_pages; }
(1) Done with any_page, (2) Found a new page.
Let n be the size of the final list.
In all cases, ct = 1.
(1) Done with any_page:
(2) Found a new page: