Algorithm · Upstart · Medium
You are given lines, an array of strings that, read in order, reproduce the contents of a robots.txt-style file. Your task is to harvest the blocklisted paths from that file. Sections are delimited by agent declarations. Whenever an element begins with the literal prefix User-agent:, a new section starts, and the text following that prefix — with leading and trailing whitespace stripped — becomes the section's agent name. A section qualifies for harvesting only when its…
Checking your access…