mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 16:31:42 +08:00
update
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
184
leetcode-cn/originData/best-time-to-buy-and-sell-stock-v.json
Normal file
184
leetcode-cn/originData/best-time-to-buy-and-sell-stock-v.json
Normal file
File diff suppressed because one or more lines are too long
96
leetcode-cn/originData/classes-with-at-least-5-students.json
Normal file
96
leetcode-cn/originData/classes-with-at-least-5-students.json
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "596",
|
||||
"questionFrontendId": "596",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 1418,
|
||||
"title": "Classes With at Least 5 Students",
|
||||
"titleSlug": "classes-with-at-least-5-students",
|
||||
"content": "<p>Table: <code>Courses</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| student | varchar |\n| class | varchar |\n+-------------+---------+\n(student, class) is the primary key (combination of columns with unique values) for this table.\nEach row of this table indicates the name of a student and the class in which they are enrolled.\n</pre>\n\n<p> </p>\n\n<p>Write a solution to find all the classes that have <strong>at least five students</strong>.</p>\n\n<p>Return the result table in <strong>any order</strong>.</p>\n\n<p>The result format is in the following example.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> \nCourses table:\n+---------+----------+\n| student | class |\n+---------+----------+\n| A | Math |\n| B | English |\n| C | Math |\n| D | Biology |\n| E | Math |\n| F | Computer |\n| G | Math |\n| H | Math |\n| I | Math |\n+---------+----------+\n<strong>Output:</strong> \n+---------+\n| class |\n+---------+\n| Math |\n+---------+\n<strong>Explanation:</strong> \n- Math has 6 students, so we include it.\n- English has 1 student, so we do not include it.\n- Biology has 1 student, so we do not include it.\n- Computer has 1 student, so we do not include it.\n</pre>\n",
|
||||
"translatedTitle": "超过 5 名学生的课",
|
||||
"translatedContent": "<p>表: <code>Courses</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| student | varchar |\n| class | varchar |\n+-------------+---------+\n(student, class)是该表的主键(不同值的列的组合)。\n该表的每一行表示学生的名字和他们注册的班级。\n</pre>\n\n<p> </p>\n\n<p>查询 <strong>至少有 5 个学生</strong> 的所有班级。</p>\n\n<p>以 <strong>任意顺序 </strong>返回结果表。</p>\n\n<p>结果格式如下所示。</p>\n\n<p> </p>\n\n<p><strong class=\"example\">示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> \nCourses table:\n+---------+----------+\n| student | class |\n+---------+----------+\n| A | Math |\n| B | English |\n| C | Math |\n| D | Biology |\n| E | Math |\n| F | Computer |\n| G | Math |\n| H | Math |\n| I | Math |\n+---------+----------+\n<strong>输出:</strong> \n+---------+ \n| class | \n+---------+ \n| Math | \n+---------+\n<strong>解释: </strong>\n-数学课有 6 个学生,所以我们包括它。\n-英语课有 1 名学生,所以我们不包括它。\n-生物课有 1 名学生,所以我们不包括它。\n-计算机课有 1 个学生,所以我们不包括它。</pre>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 354,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false, \"cangjie\": false}",
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": [
|
||||
{
|
||||
"lang": "MySQL",
|
||||
"langSlug": "mysql",
|
||||
"code": "# Write your MySQL query statement below",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "MS SQL Server",
|
||||
"langSlug": "mssql",
|
||||
"code": "/* Write your T-SQL query statement below */",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "Oracle",
|
||||
"langSlug": "oraclesql",
|
||||
"code": "/* Write your PL/SQL query statement below */",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "Pandas",
|
||||
"langSlug": "pythondata",
|
||||
"code": "import pandas as pd\n\ndef find_classes(courses: pd.DataFrame) -> pd.DataFrame:\n ",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "PostgreSQL",
|
||||
"langSlug": "postgresql",
|
||||
"code": "-- Write your PostgreSQL query statement below",
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"221.6K\", \"totalSubmission\": \"390.8K\", \"totalAcceptedRaw\": 221606, \"totalSubmissionRaw\": 390792, \"acRate\": \"56.7%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"Courses\": [\"student\", \"class\"]}, \"rows\": {\"Courses\": [[\"A\", \"Math\"], [\"B\", \"English\"], [\"C\", \"Math\"], [\"D\", \"Biology\"], [\"E\", \"Math\"], [\"F\", \"Computer\"], [\"G\", \"Math\"], [\"H\", \"Math\"], [\"I\", \"Math\"]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table If Not Exists Courses (student varchar(255), class varchar(255))\"],\"mssql\":[\"Create table Courses (student varchar(255), class varchar(255))\"],\"oraclesql\":[\"Create table Courses (student varchar(255), class varchar(255))\"],\"database\":true,\"name\":\"find_classes\",\"pythondata\":[\"Courses = pd.DataFrame([], columns=['student', 'class']).astype({'student':'object', 'class':'object'})\"],\"postgresql\":[\"Create table If Not Exists Courses (student varchar(255), class varchar(255))\"],\"database_schema\":{\"Courses\":{\"student\":\"VARCHAR(255)\",\"class\":\"VARCHAR(255)\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Courses (student varchar(255), class varchar(255))",
|
||||
"Truncate table Courses",
|
||||
"insert into Courses (student, class) values ('A', 'Math')",
|
||||
"insert into Courses (student, class) values ('B', 'English')",
|
||||
"insert into Courses (student, class) values ('C', 'Math')",
|
||||
"insert into Courses (student, class) values ('D', 'Biology')",
|
||||
"insert into Courses (student, class) values ('E', 'Math')",
|
||||
"insert into Courses (student, class) values ('F', 'Computer')",
|
||||
"insert into Courses (student, class) values ('G', 'Math')",
|
||||
"insert into Courses (student, class) values ('H', 'Math')",
|
||||
"insert into Courses (student, class) values ('I', 'Math')"
|
||||
],
|
||||
"enableRunCode": true,
|
||||
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\": {\"Courses\": [\"student\", \"class\"]}, \"rows\": {\"Courses\": [[\"A\", \"Math\"], [\"B\", \"English\"], [\"C\", \"Math\"], [\"D\", \"Biology\"], [\"E\", \"Math\"], [\"F\", \"Computer\"], [\"G\", \"Math\"], [\"H\", \"Math\"], [\"I\", \"Math\"]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
189
leetcode-cn/originData/count-special-triplets.json
Normal file
189
leetcode-cn/originData/count-special-triplets.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
105
leetcode-cn/originData/find-books-with-no-available-copies.json
Normal file
105
leetcode-cn/originData/find-books-with-no-available-copies.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
106
leetcode-cn/originData/find-covid-recovery-patients.json
Normal file
106
leetcode-cn/originData/find-covid-recovery-patients.json
Normal file
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3932",
|
||||
"questionFrontendId": "3586",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 3701001,
|
||||
"title": "Find COVID Recovery Patients",
|
||||
"titleSlug": "find-covid-recovery-patients",
|
||||
"content": "<p>Table: <code>patients</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| patient_id | int |\n| patient_name| varchar |\n| age | int |\n+-------------+---------+\npatient_id is the unique identifier for this table.\nEach row contains information about a patient.\n</pre>\n\n<p>Table: <code>covid_tests</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| test_id | int |\n| patient_id | int |\n| test_date | date |\n| result | varchar |\n+-------------+---------+\ntest_id is the unique identifier for this table.\nEach row represents a COVID test result. The result can be Positive, Negative, or Inconclusive.\n</pre>\n\n<p>Write a solution to find patients who have <strong>recovered from COVID</strong> - patients who tested positive but later tested negative.</p>\n\n<ul>\n\t<li>A patient is considered recovered if they have <strong>at least one</strong> <strong>Positive</strong> test followed by at least one <strong>Negative</strong> test on a <strong>later date</strong></li>\n\t<li>Calculate the <strong>recovery time</strong> in days as the <strong>difference</strong> between the <strong>first positive test</strong> and the <strong>first negative test</strong> after that <strong>positive test</strong></li>\n\t<li><strong>Only include</strong> patients who have both positive and negative test results</li>\n</ul>\n\n<p>Return <em>the result table ordered by </em><code>recovery_time</code><em> in <strong>ascending</strong> order, then by </em><code>patient_name</code><em> in <strong>ascending</strong> order</em>.</p>\n\n<p>The result format is in the following example.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>Input:</strong></p>\n\n<p>patients table:</p>\n\n<pre class=\"example-io\">\n+------------+--------------+-----+\n| patient_id | patient_name | age |\n+------------+--------------+-----+\n| 1 | Alice Smith | 28 |\n| 2 | Bob Johnson | 35 |\n| 3 | Carol Davis | 42 |\n| 4 | David Wilson | 31 |\n| 5 | Emma Brown | 29 |\n+------------+--------------+-----+\n</pre>\n\n<p>covid_tests table:</p>\n\n<pre class=\"example-io\">\n+---------+------------+------------+--------------+\n| test_id | patient_id | test_date | result |\n+---------+------------+------------+--------------+\n| 1 | 1 | 2023-01-15 | Positive |\n| 2 | 1 | 2023-01-25 | Negative |\n| 3 | 2 | 2023-02-01 | Positive |\n| 4 | 2 | 2023-02-05 | Inconclusive |\n| 5 | 2 | 2023-02-12 | Negative |\n| 6 | 3 | 2023-01-20 | Negative |\n| 7 | 3 | 2023-02-10 | Positive |\n| 8 | 3 | 2023-02-20 | Negative |\n| 9 | 4 | 2023-01-10 | Positive |\n| 10 | 4 | 2023-01-18 | Positive |\n| 11 | 5 | 2023-02-15 | Negative |\n| 12 | 5 | 2023-02-20 | Negative |\n+---------+------------+------------+--------------+\n</pre>\n\n<p><strong>Output:</strong></p>\n\n<pre class=\"example-io\">\n+------------+--------------+-----+---------------+\n| patient_id | patient_name | age | recovery_time |\n+------------+--------------+-----+---------------+\n| 1 | Alice Smith | 28 | 10 |\n| 3 | Carol Davis | 42 | 10 |\n| 2 | Bob Johnson | 35 | 11 |\n+------------+--------------+-----+---------------+\n</pre>\n\n<p><strong>Explanation:</strong></p>\n\n<ul>\n\t<li><strong>Alice Smith (patient_id = 1):</strong>\n\n\t<ul>\n\t\t<li>First positive test: 2023-01-15</li>\n\t\t<li>First negative test after positive: 2023-01-25</li>\n\t\t<li>Recovery time: 25 - 15 = 10 days</li>\n\t</ul>\n\t</li>\n\t<li><strong>Bob Johnson (patient_id = 2):</strong>\n\t<ul>\n\t\t<li>First positive test: 2023-02-01</li>\n\t\t<li>Inconclusive test on 2023-02-05 (ignored for recovery calculation)</li>\n\t\t<li>First negative test after positive: 2023-02-12</li>\n\t\t<li>Recovery time: 12 - 1 = 11 days</li>\n\t</ul>\n\t</li>\n\t<li><strong>Carol Davis (patient_id = 3):</strong>\n\t<ul>\n\t\t<li>Had negative test on 2023-01-20 (before positive test)</li>\n\t\t<li>First positive test: 2023-02-10</li>\n\t\t<li>First negative test after positive: 2023-02-20</li>\n\t\t<li>Recovery time: 20 - 10 = 10 days</li>\n\t</ul>\n\t</li>\n\t<li><strong>Patients not included:</strong>\n\t<ul>\n\t\t<li>David Wilson (patient_id = 4): Only has positive tests, no negative test after positive</li>\n\t\t<li>Emma Brown (patient_id = 5): Only has negative tests, never tested positive</li>\n\t</ul>\n\t</li>\n</ul>\n\n<p>Output table is ordered by recovery_time in ascending order, and then by patient_name in ascending order.</p>\n</div>\n",
|
||||
"translatedTitle": "寻找 COVID 康复患者",
|
||||
"translatedContent": "<p>表:<code>patients</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| patient_id | int |\n| patient_name| varchar |\n| age | int |\n+-------------+---------+\npatient_id 是这张表的唯一主键。\n每一行表示一个患者的信息。\n</pre>\n\n<p>表:<code>covid_tests</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| test_id | int |\n| patient_id | int |\n| test_date | date |\n| result | varchar |\n+-------------+---------+\ntest_id 是这张表的唯一主键。\n每一行代表一个 COVID 检测结果。结果可以是阳性、阴性或不确定。\n</pre>\n\n<p>编写一个解决方案以找到从 COVID 中康复的患者——那些曾经检测呈阳性但后来检测呈阴性的患者。</p>\n\n<ul>\n\t<li>患者如果 <strong>至少有一次阳性</strong> 检测结果后,在 <strong>之后的日期</strong> 至少有一次 <strong>阴性</strong> 检测结果,则被认为已康复。</li>\n\t<li>计算从 <strong>首次阳性检测</strong> 结果到 <strong>该阳性检测</strong> 后的 <strong>首次阴性检测结果</strong> 之间的 <strong>康复时间</strong>(以天为单位)</li>\n\t<li><strong>仅包括 </strong>同时具有阳性及阴性检测结果的患者</li>\n</ul>\n\n<p>返回结果表以<em> </em><code>recovery_time</code><em> </em><strong>升序 </strong>排序,然后以<em> </em><code>patient_name</code><em> </em><strong>升序 </strong>排序。</p>\n\n<p>结果格式如下所示。</p>\n\n<p> </p>\n\n<p><strong class=\"example\">示例:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>输入:</strong></p>\n\n<p>patients 表:</p>\n\n<pre class=\"example-io\">\n+------------+--------------+-----+\n| patient_id | patient_name | age |\n+------------+--------------+-----+\n| 1 | Alice Smith | 28 |\n| 2 | Bob Johnson | 35 |\n| 3 | Carol Davis | 42 |\n| 4 | David Wilson | 31 |\n| 5 | Emma Brown | 29 |\n+------------+--------------+-----+\n</pre>\n\n<p>covid_tests 表:</p>\n\n<pre class=\"example-io\">\n+---------+------------+------------+--------------+\n| test_id | patient_id | test_date | result |\n+---------+------------+------------+--------------+\n| 1 | 1 | 2023-01-15 | Positive |\n| 2 | 1 | 2023-01-25 | Negative |\n| 3 | 2 | 2023-02-01 | Positive |\n| 4 | 2 | 2023-02-05 | Inconclusive |\n| 5 | 2 | 2023-02-12 | Negative |\n| 6 | 3 | 2023-01-20 | Negative |\n| 7 | 3 | 2023-02-10 | Positive |\n| 8 | 3 | 2023-02-20 | Negative |\n| 9 | 4 | 2023-01-10 | Positive |\n| 10 | 4 | 2023-01-18 | Positive |\n| 11 | 5 | 2023-02-15 | Negative |\n| 12 | 5 | 2023-02-20 | Negative |\n+---------+------------+------------+--------------+\n</pre>\n\n<p><strong>输出:</strong></p>\n\n<pre class=\"example-io\">\n+------------+--------------+-----+---------------+\n| patient_id | patient_name | age | recovery_time |\n+------------+--------------+-----+---------------+\n| 1 | Alice Smith | 28 | 10 |\n| 3 | Carol Davis | 42 | 10 |\n| 2 | Bob Johnson | 35 | 11 |\n+------------+--------------+-----+---------------+\n</pre>\n\n<p><strong>解释:</strong></p>\n\n<ul>\n\t<li><strong>Alice Smith (patient_id = 1):</strong>\n\n\t<ul>\n\t\t<li>首次阳性检测:2023-01-15</li>\n\t\t<li>阳性检测后的首次阴性检测:2023-01-25</li>\n\t\t<li>康复时间:25 - 15 = 10 天</li>\n\t</ul>\n\t</li>\n\t<li><strong>Bob Johnson (patient_id = 2):</strong>\n\t<ul>\n\t\t<li>首次阳性检测:2023-02-01</li>\n\t\t<li>测试结果不明确:2023-02-05(忽略计算康复时间)</li>\n\t\t<li>阳性检测后的首次阴性检测:2023-02-12</li>\n\t\t<li>康复时间:12 - 1 = 11 天</li>\n\t</ul>\n\t</li>\n\t<li><strong>Carol Davis (patient_id = 3):</strong>\n\t<ul>\n\t\t<li>检测呈阴性:2023-01-20(在阳性检测前)</li>\n\t\t<li>首次阳性检测:2023-02-10</li>\n\t\t<li>阳性检测后的首次阴性检测:2023-02-20</li>\n\t\t<li>康复时间:20 - 10 = 10 天</li>\n\t</ul>\n\t</li>\n\t<li><strong>没有包含的患者:</strong>\n\t<ul>\n\t\t<li>David Wilson(patient_id = 4):只有阳性检测,之后没有阴性检测。</li>\n\t\t<li>Emma Brown(patient_id = 5):只有阴性检测,从未有阳性检测。</li>\n\t</ul>\n\t</li>\n</ul>\n\n<p>输出表以 recovery_time 升序排序,然后以 patient_name 升序排序。</p>\n</div>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false, \"cangjie\": false}",
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": [
|
||||
{
|
||||
"lang": "MySQL",
|
||||
"langSlug": "mysql",
|
||||
"code": "# Write your MySQL query statement below",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "MS SQL Server",
|
||||
"langSlug": "mssql",
|
||||
"code": "/* Write your T-SQL query statement below */",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "Oracle",
|
||||
"langSlug": "oraclesql",
|
||||
"code": "/* Write your PL/SQL query statement below */",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "Pandas",
|
||||
"langSlug": "pythondata",
|
||||
"code": "import pandas as pd\n\ndef find_covid_recovery_patients(patients: pd.DataFrame, covid_tests: pd.DataFrame) -> pd.DataFrame:\n ",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "PostgreSQL",
|
||||
"langSlug": "postgresql",
|
||||
"code": "-- Write your PostgreSQL query statement below",
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"102\", \"totalSubmission\": \"180\", \"totalAcceptedRaw\": 102, \"totalSubmissionRaw\": 180, \"acRate\": \"56.7%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"patients\":[\"patient_id\",\"patient_name\",\"age\"],\"covid_tests\":[\"test_id\",\"patient_id\",\"test_date\",\"result\"]},\"rows\":{\"patients\":[[1,\"Alice Smith\",28],[2,\"Bob Johnson\",35],[3,\"Carol Davis\",42],[4,\"David Wilson\",31],[5,\"Emma Brown\",29]],\"covid_tests\":[[1,1,\"2023-01-15\",\"Positive\"],[2,1,\"2023-01-25\",\"Negative\"],[3,2,\"2023-02-01\",\"Positive\"],[4,2,\"2023-02-05\",\"Inconclusive\"],[5,2,\"2023-02-12\",\"Negative\"],[6,3,\"2023-01-20\",\"Negative\"],[7,3,\"2023-02-10\",\"Positive\"],[8,3,\"2023-02-20\",\"Negative\"],[9,4,\"2023-01-10\",\"Positive\"],[10,4,\"2023-01-18\",\"Positive\"],[11,5,\"2023-02-15\",\"Negative\"],[12,5,\"2023-02-20\",\"Negative\"]]}}",
|
||||
"metaData": "{\"mysql\":[\"CREATE TABLE patients (\\n patient_id INT,\\n patient_name VARCHAR(255),\\n age INT\\n)\",\"CREATE TABLE covid_tests (\\n test_id INT,\\n patient_id INT,\\n test_date DATE,\\n result VARCHAR(50)\\n)\"],\"mssql\":[\"CREATE TABLE patients (\\n patient_id INT,\\n patient_name VARCHAR(255),\\n age INT\\n)\",\"CREATE TABLE covid_tests (\\n test_id INT,\\n patient_id INT,\\n test_date DATE,\\n result VARCHAR(50)\\n)\"],\"oraclesql\":[\"CREATE TABLE patients (\\n patient_id NUMBER,\\n patient_name VARCHAR2(255),\\n age NUMBER\\n)\",\"CREATE TABLE covid_tests (\\n test_id NUMBER,\\n patient_id NUMBER,\\n test_date DATE,\\n result VARCHAR2(50)\\n)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"],\"database\":true,\"name\":\"find_covid_recovery_patients\",\"postgresql\":[\"CREATE TABLE patients (\\n patient_id INTEGER,\\n patient_name VARCHAR(255),\\n age INTEGER\\n);\\n\",\"CREATE TABLE covid_tests (\\n test_id INTEGER,\\n patient_id INTEGER,\\n test_date DATE,\\n result VARCHAR(50)\\n);\\n\"],\"pythondata\":[\"patients = pd.DataFrame({\\n 'patient_id': pd.Series(dtype='int'),\\n 'patient_name': pd.Series(dtype='str'),\\n 'age': pd.Series(dtype='int')\\n})\",\"covid_tests = pd.DataFrame({\\n 'test_id': pd.Series(dtype='int'),\\n 'patient_id': pd.Series(dtype='int'),\\n 'test_date': pd.Series(dtype='datetime64[ns]'),\\n 'result': pd.Series(dtype='str')\\n})\"],\"database_schema\":{\"patients\":{\"patient_id\":\"INT\",\"patient_name\":\"VARCHAR(255)\",\"age\":\"INT\"},\"covid_tests\":{\"test_id\":\"INT\",\"patient_id\":\"INT\",\"test_date\":\"DATE\",\"result\":\"VARCHAR(50)\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"CREATE TABLE patients (\n patient_id INT,\n patient_name VARCHAR(255),\n age INT\n)",
|
||||
"CREATE TABLE covid_tests (\n test_id INT,\n patient_id INT,\n test_date DATE,\n result VARCHAR(50)\n)",
|
||||
"Truncate table patients",
|
||||
"insert into patients (patient_id, patient_name, age) values ('1', 'Alice Smith', '28')",
|
||||
"insert into patients (patient_id, patient_name, age) values ('2', 'Bob Johnson', '35')",
|
||||
"insert into patients (patient_id, patient_name, age) values ('3', 'Carol Davis', '42')",
|
||||
"insert into patients (patient_id, patient_name, age) values ('4', 'David Wilson', '31')",
|
||||
"insert into patients (patient_id, patient_name, age) values ('5', 'Emma Brown', '29')",
|
||||
"Truncate table covid_tests",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('1', '1', '2023-01-15', 'Positive')",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('2', '1', '2023-01-25', 'Negative')",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('3', '2', '2023-02-01', 'Positive')",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('4', '2', '2023-02-05', 'Inconclusive')",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('5', '2', '2023-02-12', 'Negative')",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('6', '3', '2023-01-20', 'Negative')",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('7', '3', '2023-02-10', 'Positive')",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('8', '3', '2023-02-20', 'Negative')",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('9', '4', '2023-01-10', 'Positive')",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('10', '4', '2023-01-18', 'Positive')",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('11', '5', '2023-02-15', 'Negative')",
|
||||
"insert into covid_tests (test_id, patient_id, test_date, result) values ('12', '5', '2023-02-20', 'Negative')"
|
||||
],
|
||||
"enableRunCode": true,
|
||||
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"patients\":[\"patient_id\",\"patient_name\",\"age\"],\"covid_tests\":[\"test_id\",\"patient_id\",\"test_date\",\"result\"]},\"rows\":{\"patients\":[[1,\"Alice Smith\",28],[2,\"Bob Johnson\",35],[3,\"Carol Davis\",42],[4,\"David Wilson\",31],[5,\"Emma Brown\",29]],\"covid_tests\":[[1,1,\"2023-01-15\",\"Positive\"],[2,1,\"2023-01-25\",\"Negative\"],[3,2,\"2023-02-01\",\"Positive\"],[4,2,\"2023-02-05\",\"Inconclusive\"],[5,2,\"2023-02-12\",\"Negative\"],[6,3,\"2023-01-20\",\"Negative\"],[7,3,\"2023-02-10\",\"Positive\"],[8,3,\"2023-02-20\",\"Negative\"],[9,4,\"2023-01-10\",\"Positive\"],[10,4,\"2023-01-18\",\"Positive\"],[11,5,\"2023-02-15\",\"Negative\"],[12,5,\"2023-02-20\",\"Negative\"]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
204
leetcode-cn/originData/find-weighted-median-node-in-tree.json
Normal file
204
leetcode-cn/originData/find-weighted-median-node-in-tree.json
Normal file
File diff suppressed because one or more lines are too long
182
leetcode-cn/originData/generate-tag-for-video-caption.json
Normal file
182
leetcode-cn/originData/generate-tag-for-video-caption.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
195
leetcode-cn/originData/maximize-subarray-gcd-score.json
Normal file
195
leetcode-cn/originData/maximize-subarray-gcd-score.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
207
leetcode-cn/originData/maximum-good-subtree-score.json
Normal file
207
leetcode-cn/originData/maximum-good-subtree-score.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
201
leetcode-cn/originData/minimum-moves-to-clean-the-classroom.json
Normal file
201
leetcode-cn/originData/minimum-moves-to-clean-the-classroom.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
109
leetcode-cn/originData/seasonal-sales-analysis.json
Normal file
109
leetcode-cn/originData/seasonal-sales-analysis.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user