Core Algorithms I PROCEDURE SPIDER (G) Let ROOT :any URL from G Initialize STACK <stack data structure> Let STACK push(ROOT,STACK) Initialize COLLECTION <big file of URL-page pairs> While STACK is not empty, URLeu :POP(STACK) PAGE :1ook-up (URLeurr) STORE (<URL,PAGE>,COLLECTION) For every URL:in PAGE, push (URL;,STACK) Return COLLECTIONCore Algorithms I PROCEDURE SPIDER1(G) Let ROOT := any URL from G Initialize STACK <stack data structure> Let STACK := push(ROOT, STACK) Initialize COLLECTION <big file of URL-page pairs> While STACK is not empty, URLcurr := pop(STACK) PAGE := look-up(URLcurr) STORE(<URLcurr, PAGE>, COLLECTION) For every URLi in PAGE, push(URLi, STACK) Return COLLECTION