{ "data": { "question": { "questionId": "1271", "questionFrontendId": "1236", "boundTopicId": null, "title": "Web Crawler", "titleSlug": "web-crawler", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 181, "dislikes": 201, "isLiked": null, "similarQuestions": "[{\"title\": \"Web Crawler Multithreaded\", \"titleSlug\": \"web-crawler-multithreaded\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]", "exampleTestcases": "[\"http://news.yahoo.com\",\"http://news.yahoo.com/news\",\"http://news.yahoo.com/news/topics/\",\"http://news.google.com\",\"http://news.yahoo.com/us\"]\n[[2,0],[2,1],[3,2],[3,1],[0,4]]\n\"http://news.yahoo.com/news/topics/\"\n[\"http://news.yahoo.com\",\"http://news.yahoo.com/news\",\"http://news.yahoo.com/news/topics/\",\"http://news.google.com\"]\n[[0,2],[2,1],[3,2],[3,1],[3,0]]\n\"http://news.google.com\"", "categoryTitle": "Algorithms", "contributors": [], "topicTags": [ { "name": "String", "slug": "string", "translatedName": null, "__typename": "TopicTagNode" }, { "name": "Depth-First Search", "slug": "depth-first-search", "translatedName": null, "__typename": "TopicTagNode" }, { "name": "Breadth-First Search", "slug": "breadth-first-search", "translatedName": null, "__typename": "TopicTagNode" }, { "name": "Interactive", "slug": "interactive", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"22.1K\", \"totalSubmission\": \"33.7K\", \"totalAcceptedRaw\": 22149, \"totalSubmissionRaw\": 33735, \"acRate\": \"65.7%\"}", "hints": [ "Use DFS/BFS to search start from the startURL. Remember to get rid of duplicate URLs." ], "solution": null, "status": null, "sampleTestCase": "[\"http://news.yahoo.com\",\"http://news.yahoo.com/news\",\"http://news.yahoo.com/news/topics/\",\"http://news.google.com\",\"http://news.yahoo.com/us\"]\n[[2,0],[2,1],[3,2],[3,1],[0,4]]\n\"http://news.yahoo.com/news/topics/\"", "metaData": "{\n \"name\": \"crawl\",\n \"params\": [\n {\n \"name\": \"urls\",\n \"type\": \"string[]\"\n },\n {\n \"type\": \"integer[][]\",\n \"name\": \"edges\"\n },\n {\n \"type\": \"string\",\n \"name\": \"startUrl\"\n }\n ],\n \"return\": {\n \"type\": \"list\"\n },\n \"manual\": true,\n \"languages\": [\n \"cpp\",\n \"java\",\n \"python\",\n \"csharp\",\n \"python3\",\n \"javascript\",\n \"kotlin\",\n \"ruby\",\n \"scala\",\n \"swift\",\n \"php\",\n \"golang\",\n \"typescript\"\n ]\n}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [], "enableRunCode": true, "enableTestMode": false, "enableDebugger": true, "envInfo": "{\"cpp\": [\"C++\", \"

Compiled with clang 11 using the latest C++ 17 standard.

\\r\\n\\r\\n

Your code is compiled with level two optimization (-O2). AddressSanitizer is also enabled to help detect out-of-bounds and use-after-free bugs.

\\r\\n\\r\\n

Most standard library headers are already included automatically for your convenience.

\"], \"java\": [\"Java\", \"

OpenJDK 17 . Java 8 features such as lambda expressions and stream API can be used.

\\r\\n\\r\\n

Most standard library headers are already included automatically for your convenience.

\\r\\n

Includes Pair class from https://docs.oracle.com/javase/8/javafx/api/javafx/util/Pair.html.

\"], \"python\": [\"Python\", \"

Python 2.7.12.

\\r\\n\\r\\n

Most libraries are already imported automatically for your convenience, such as array, bisect, collections. If you need more libraries, you can import it yourself.

\\r\\n\\r\\n

For Map/TreeMap data structure, you may use sortedcontainers library.

\\r\\n\\r\\n

Note that Python 2.7 will not be maintained past 2020. For the latest Python, please choose Python3 instead.

\"], \"csharp\": [\"C#\", \"

C# 10 with .NET 6 runtime

\\r\\n\\r\\n

Your code is compiled with debug flag enabled (/debug).

\"], \"javascript\": [\"JavaScript\", \"

Node.js 16.13.2.

\\r\\n\\r\\n

Your code is run with --harmony flag, enabling new ES6 features.

\\r\\n\\r\\n

lodash.js library is included by default.

\\r\\n\\r\\n

For Priority Queue / Queue data structures, you may use datastructures-js/priority-queue and datastructures-js/queue.

\"], \"ruby\": [\"Ruby\", \"

Ruby 3.1

\\r\\n\\r\\n

Some common data structure implementations are provided in the Algorithms module: https://www.rubydoc.info/github/kanwei/algorithms/Algorithms

\"], \"swift\": [\"Swift\", \"

Swift 5.5.2.

\"], \"golang\": [\"Go\", \"

Go 1.17.6.

\\r\\n\\r\\n

Support https://godoc.org/github.com/emirpasic/gods library.

\"], \"python3\": [\"Python3\", \"

Python 3.10.

\\r\\n\\r\\n

Most libraries are already imported automatically for your convenience, such as array, bisect, collections. If you need more libraries, you can import it yourself.

\\r\\n\\r\\n

For Map/TreeMap data structure, you may use sortedcontainers library.

\"], \"scala\": [\"Scala\", \"

Scala 2.13.7.

\"], \"kotlin\": [\"Kotlin\", \"

Kotlin 1.3.10.

\"], \"php\": [\"PHP\", \"

PHP 8.1.

\\r\\n

With bcmath module

\"], \"typescript\": [\"Typescript\", \"

TypeScript 4.5.4, Node.js 16.13.2.

\\r\\n\\r\\n

Your code is run with --harmony flag, enabling new ES2020 features.

\\r\\n\\r\\n

lodash.js library is included by default.

\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }