← 返回 atlassian 的题目列表Deduplicate URLs before fetching and validate behavior
类型:online_judge
Extend the sequential URL fetcher by deduplicating URLs before sending requests.
Requirements
Input: a list of URLs that may contain duplicates.
Behavior: fetch only unique URLs (optionally preserving first-seen order).
Output: results for the deduplicated URLs (same result shape as before).
Describe/implement a test approach that proves deduplication happened (e.g., assert number of actual HTTP hits against a mock server).
Constraints
1 ≤ n ≤ 200
Example Input: [A, B, A, C, B] Output: fetch only A, B, C once each and return 3 results.
Example
Input
(mock) ["/a","/b","/a","/c"]
Output
3 results for /a,/b,/c and mock hit counts: a=1,b=1,c=1