Reported interview periodSep 2025–Jun 2026
Implement a Same-Host Web Crawler
You are given a seed URL and a parser object. Calling htmlParser.getUrls(url) returns the links found on that page. Return every reachable URL whose hostname matches the seed URL's hostname, including the seed …
Practice focusRequirements - Visit each accepted URL at most once. - Never follow a link to another hostname. - Use the supplied parser rather than implementing HTTP fetching. - Return all reachable accepted URLs; result order is not significant. - Treat complete URL strings as visit identities. Compare parsed hostnames, not hostname substrings; different ports and schemes on the same hostname remain eligible. Assume syntactically valid absolute HTTP(S) URLs. No URL canonicalization, redirect fetching or network access is required.…