{ "data": { "question": { "questionId": "1209", "questionFrontendId": "1188", "boundTopicId": null, "title": "Design Bounded Blocking Queue", "titleSlug": "design-bounded-blocking-queue", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 413, "dislikes": 33, "isLiked": null, "similarQuestions": "[]", "exampleTestcases": "1\n1\n[\"BoundedBlockingQueue\",\"enqueue\",\"dequeue\",\"dequeue\",\"enqueue\",\"enqueue\",\"enqueue\",\"enqueue\",\"dequeue\"]\n[[2],[1],[],[],[0],[2],[3],[4],[]]\n3\n4\n[\"BoundedBlockingQueue\",\"enqueue\",\"enqueue\",\"enqueue\",\"dequeue\",\"dequeue\",\"dequeue\",\"enqueue\"]\n[[3],[1],[0],[2],[],[],[],[3]]", "categoryTitle": "Concurrency", "contributors": [], "topicTags": [ { "name": "Concurrency", "slug": "concurrency", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"35.9K\", \"totalSubmission\": \"49.2K\", \"totalAcceptedRaw\": 35940, \"totalSubmissionRaw\": 49215, \"acRate\": \"73.0%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "1\n1\n[\"BoundedBlockingQueue\",\"enqueue\",\"dequeue\",\"dequeue\",\"enqueue\",\"enqueue\",\"enqueue\",\"enqueue\",\"dequeue\"]\n[[2],[1],[],[],[0],[2],[3],[4],[]]", "metaData": "{\n \"name\": \"foobar\",\n \"params\": [\n {\n \"name\": \"numsProducerThread\",\n \"type\": \"integer\"\n },\n {\n \"type\": \"integer\",\n \"name\": \"numsConsumerThread\"\n },\n {\n \"type\": \"string[]\",\n \"name\": \"methods\"\n },\n {\n \"type\": \"integer[]\",\n \"name\": \"params\"\n }\n ],\n \"return\": {\n \"type\": \"integer\"\n },\n \"languages\": [\n \"cpp\",\n \"java\",\n \"python\",\n \"python3\"\n ],\n \"manual\": true\n}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [], "enableRunCode": true, "enableTestMode": false, "enableDebugger": false, "envInfo": "{\"cpp\": [\"C++\", \"
Compiled with clang 11
using the latest C++ 17 standard.
Your code is compiled with level two optimization (-O2
). AddressSanitizer is also enabled to help detect out-of-bounds and use-after-free bugs.
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.
Most standard library headers are already included automatically for your convenience.
\\r\\nIncludes Pair
class from https://docs.oracle.com/javase/8/javafx/api/javafx/util/Pair.html.
Python 2.7.12
.
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\\nFor Map/TreeMap data structure, you may use sortedcontainers library.
\\r\\n\\r\\nNote that Python 2.7 will not be maintained past 2020. For the latest Python, please choose Python3 instead.
\"], \"python3\": [\"Python3\", \"Python 3.10
.
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\\nFor Map/TreeMap data structure, you may use sortedcontainers library.
\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }