{ "data": { "question": { "questionId": "1774", "questionFrontendId": "1634", "boundTopicId": null, "title": "Add Two Polynomials Represented as Linked Lists", "titleSlug": "add-two-polynomials-represented-as-linked-lists", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 79, "dislikes": 5, "isLiked": null, "similarQuestions": "[{\"title\": \"Add Two Numbers\", \"titleSlug\": \"add-two-numbers\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Merge Two Sorted Lists\", \"titleSlug\": \"merge-two-sorted-lists\", \"difficulty\": \"Easy\", \"translatedTitle\": null}, {\"title\": \"Add Two Numbers II\", \"titleSlug\": \"add-two-numbers-ii\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]", "exampleTestcases": "[[1,1]]\n[[1,0]]\n[[2,2],[4,1],[3,0]]\n[[3,2],[-4,1],[-1,0]]\n[[1,2]]\n[[-1,2]]", "categoryTitle": "Algorithms", "contributors": [], "topicTags": [ { "name": "Linked List", "slug": "linked-list", "translatedName": null, "__typename": "TopicTagNode" }, { "name": "Math", "slug": "math", "translatedName": null, "__typename": "TopicTagNode" }, { "name": "Two Pointers", "slug": "two-pointers", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"5K\", \"totalSubmission\": \"9.4K\", \"totalAcceptedRaw\": 5040, \"totalSubmissionRaw\": 9362, \"acRate\": \"53.8%\"}", "hints": [ "Process both linked lists at the same time", "If the current power of the two heads is equal, add this power with the sum of the coefficients to the answer list.", "If one head has a larger power, add this power to the answer list and move only this head." ], "solution": null, "status": null, "sampleTestCase": "[[1,1]]\n[[1,0]]", "metaData": "{\n \"name\": \"addPoly\",\n \"params\": [\n {\n \"type\": \"integer[][]\",\n \"name\": \"poly1\"\n },\n {\n \"type\": \"integer[][]\",\n \"name\": \"poly2\"\n }\n ],\n \"return\": {\n \"type\": \"integer\"\n },\n \"manual\": true,\n \"languages\": [\n \"cpp\",\n \"java\",\n \"javascript\",\n \"python3\",\n \"python\",\n \"csharp\"\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.

\"], \"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.

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