{ "data": { "question": { "questionId": "3369", "questionFrontendId": "3061", "boundTopicId": null, "title": "Calculate Trapping Rain Water", "titleSlug": "calculate-trapping-rain-water", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Hard", "likes": 1, "dislikes": 1, "isLiked": null, "similarQuestions": "[]", "exampleTestcases": "{\"headers\":{\"Heights\":[\"id\",\"height\"]},\"rows\":{\"Heights\":[[1,0],[2,1],[3,0],[4,2],[5,1],[6,0],[7,1],[8,3],[9,2],[10,1],[11,2],[12,1]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"39\", \"totalSubmission\": \"50\", \"totalAcceptedRaw\": 39, \"totalSubmissionRaw\": 50, \"acRate\": \"78.0%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Heights\":[\"id\",\"height\"]},\"rows\":{\"Heights\":[[1,0],[2,1],[3,0],[4,2],[5,1],[6,0],[7,1],[8,3],[9,2],[10,1],[11,2],[12,1]]}}", "metaData": "{\"mysql\": [\"Create Table if not Exists Heights(id int, height int)\"], \"mssql\": [\"Create Table Heights(id int,height int)\"], \"oraclesql\": [\"Create Table Heights(id int,height int)\"], \"database\": true, \"name\": \"calculate_trapped_rain_water\", \"postgresql\": [\"CREATE TABLE Heights(\\n id int,\\n height int\\n);\\n\"], \"pythondata\": [\"Heights = pd.DataFrame([], columns=['id', 'height']).astype({'id':'Int64', 'height':'Int64'})\\n\"], \"database_schema\": {\"Heights\": {\"id\": \"INT\", \"height\": \"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create Table if not Exists Heights(id int, height int)", "Truncate table Heights", "insert into Heights (id, height) values ('1', '0')", "insert into Heights (id, height) values ('2', '1')", "insert into Heights (id, height) values ('3', '0')", "insert into Heights (id, height) values ('4', '2')", "insert into Heights (id, height) values ('5', '1')", "insert into Heights (id, height) values ('6', '0')", "insert into Heights (id, height) values ('7', '1')", "insert into Heights (id, height) values ('8', '3')", "insert into Heights (id, height) values ('9', '2')", "insert into Heights (id, height) values ('10', '1')", "insert into Heights (id, height) values ('11', '2')", "insert into Heights (id, height) values ('12', '1')" ], "enableRunCode": true, "enableTestMode": false, "enableDebugger": false, "envInfo": "{\"mysql\": [\"MySQL\", \"
MySQL 8.0
.
mssql server 2019
.
Oracle Sql 11.2
.
Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0
\"], \"postgresql\": [\"PostgreSQL\", \"PostgreSQL 16
\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }