1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-06 07:51:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -7,17 +7,17 @@
"boundTopicId": 1287,
"title": "Rising Temperature",
"titleSlug": "rising-temperature",
"content": "<p>Table: <code>Weather</code></p>\n\n<pre>\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| id | int |\n| recordDate | date |\n| temperature | int |\n+---------------+---------+\nid is the primary key for this table.\nThis table contains information about the temperature on a certain day.\n</pre>\n\n<p>&nbsp;</p>\n\n<p>Write an SQL query to find all dates&#39; <code>Id</code> with higher temperatures compared to its previous dates (yesterday).</p>\n\n<p>Return the result table in <strong>any order</strong>.</p>\n\n<p>The query result format is in the following example.</p>\n\n<p>&nbsp;</p>\n<p><strong>Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> \nWeather table:\n+----+------------+-------------+\n| id | recordDate | temperature |\n+----+------------+-------------+\n| 1 | 2015-01-01 | 10 |\n| 2 | 2015-01-02 | 25 |\n| 3 | 2015-01-03 | 20 |\n| 4 | 2015-01-04 | 30 |\n+----+------------+-------------+\n<strong>Output:</strong> \n+----+\n| id |\n+----+\n| 2 |\n| 4 |\n+----+\n<strong>Explanation:</strong> \nIn 2015-01-02, the temperature was higher than the previous day (10 -&gt; 25).\nIn 2015-01-04, the temperature was higher than the previous day (20 -&gt; 30).\n</pre>\n",
"content": "<p>Table: <code>Weather</code></p>\n\n<pre>\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| id | int |\n| recordDate | date |\n| temperature | int |\n+---------------+---------+\nid is the column with unique values for this table.\nThis table contains information about the temperature on a certain day.\n</pre>\n\n<p>&nbsp;</p>\n\n<p>Write a solution to find all dates&#39; <code>Id</code> with higher temperatures compared to its previous dates (yesterday).</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>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> \nWeather table:\n+----+------------+-------------+\n| id | recordDate | temperature |\n+----+------------+-------------+\n| 1 | 2015-01-01 | 10 |\n| 2 | 2015-01-02 | 25 |\n| 3 | 2015-01-03 | 20 |\n| 4 | 2015-01-04 | 30 |\n+----+------------+-------------+\n<strong>Output:</strong> \n+----+\n| id |\n+----+\n| 2 |\n| 4 |\n+----+\n<strong>Explanation:</strong> \nIn 2015-01-02, the temperature was higher than the previous day (10 -&gt; 25).\nIn 2015-01-04, the temperature was higher than the previous day (20 -&gt; 30).\n</pre>\n",
"translatedTitle": "上升的温度",
"translatedContent": "<div class=\"original__bRMd\">\n<div>\n<p>表:&nbsp;<code>Weather</code></p>\n\n<pre>\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| id | int |\n| recordDate | date |\n| temperature | int |\n+---------------+---------+\nid 是这个表的主键\n该表包含特定日期的温度信息</pre>\n\n<p>&nbsp;</p>\n\n<p>编写一个 SQL 查询,来查找与之前(昨天的)日期相比温度更高的所有日期的 <code>id</code> 。</p>\n\n<p>返回结果 <strong>不要求顺序</strong> 。</p>\n\n<p>查询结果格式如下例。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<code><strong>输入:</strong>\nWeather 表:</code>\n+----+------------+-------------+\n| id | recordDate | Temperature |\n+----+------------+-------------+\n| 1 | 2015-01-01 | 10 |\n| 2 | 2015-01-02 | 25 |\n| 3 | 2015-01-03 | 20 |\n| 4 | 2015-01-04 | 30 |\n+----+------------+-------------+\n<strong>输出:</strong>\n+----+\n| id |\n+----+\n| 2 |\n| 4 |\n+----+\n<strong>解释:</strong>\n2015-01-02 的温度比前一天高10 -&gt; 25\n2015-01-04 的温度比前一天高20 -&gt; 30</pre>\n</div>\n</div>\n",
"translatedContent": "<div class=\"original__bRMd\">\n<div>\n<p>表:&nbsp;<code>Weather</code></p>\n\n<pre>\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| id | int |\n| recordDate | date |\n| temperature | int |\n+---------------+---------+\nid 是该表具有唯一值的列。\n该表包含特定日期的温度信息</pre>\n\n<p>&nbsp;</p>\n\n<p>编写解决方案,找出与之前(昨天的)日期相比温度更高的所有日期的 <code>id</code> 。</p>\n\n<p>返回结果 <strong>无顺序要求</strong> 。</p>\n\n<p>结果格式如下例子所示。</p>\n\n<p>&nbsp;</p>\n\n<p><strong class=\"example\">示例 1</strong></p>\n\n<pre>\n<code><strong>输入:</strong>\nWeather 表:</code>\n+----+------------+-------------+\n| id | recordDate | Temperature |\n+----+------------+-------------+\n| 1 | 2015-01-01 | 10 |\n| 2 | 2015-01-02 | 25 |\n| 3 | 2015-01-03 | 20 |\n| 4 | 2015-01-04 | 30 |\n+----+------------+-------------+\n<strong>输出:</strong>\n+----+\n| id |\n+----+\n| 2 |\n| 4 |\n+----+\n<strong>解释:</strong>\n2015-01-02 的温度比前一天高10 -&gt; 25\n2015-01-04 的温度比前一天高20 -&gt; 30</pre>\n</div>\n</div>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 296,
"likes": 540,
"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, \"ruby\": false, \"bash\": false, \"swift\": false, \"golang\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"kotlin\": false, \"rust\": false, \"php\": false, \"typescript\": false, \"racket\": false, \"erlang\": false, \"elixir\": false}",
"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}",
"topicTags": [
{
"name": "Database",
@@ -45,9 +45,21 @@
"langSlug": "oraclesql",
"code": "/* Write your PL/SQL query statement below */",
"__typename": "CodeSnippetNode"
},
{
"lang": "Pandas",
"langSlug": "pythondata",
"code": "import pandas as pd\n\ndef rising_temperature(weather: pd.DataFrame) -> pd.DataFrame:\n ",
"__typename": "CodeSnippetNode"
},
{
"lang": "PostgreSQL",
"langSlug": "postgresql",
"code": "-- Write your PostgreSQL query statement below",
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"119.1K\", \"totalSubmission\": \"223.3K\", \"totalAcceptedRaw\": 119068, \"totalSubmissionRaw\": 223304, \"acRate\": \"53.3%\"}",
"stats": "{\"totalAccepted\": \"209.7K\", \"totalSubmission\": \"391.4K\", \"totalAcceptedRaw\": 209706, \"totalSubmissionRaw\": 391391, \"acRate\": \"53.6%\"}",
"hints": [],
"solution": {
"id": "96",
@@ -55,8 +67,8 @@
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "{\"headers\": {\"Weather\": [\"Id\", \"RecordDate\", \"Temperature\"]}, \"rows\": {\"Weather\": [[1, \"2015-01-01\", 10], [2, \"2015-01-02\", 25], [3, \"2015-01-03\", 20], [4, \"2015-01-04\", 30]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Weather (id int, recordDate date, temperature int)\"\n ],\n \"mssql\": [\n \"Create table Weather (id int, recordDate date, temperature int)\"\n ],\n \"oraclesql\": [\n \"Create table Weather (id int, recordDate date, temperature int)\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}",
"sampleTestCase": "{\"headers\": {\"Weather\": [\"id\", \"recordDate\", \"temperature\"]}, \"rows\": {\"Weather\": [[1, \"2015-01-01\", 10], [2, \"2015-01-02\", 25], [3, \"2015-01-03\", 20], [4, \"2015-01-04\", 30]]}}",
"metaData": "{\"mysql\":[\"Create table If Not Exists Weather (id int, recordDate date, temperature int)\"],\"mssql\":[\"Create table Weather (id int, recordDate date, temperature int)\"],\"oraclesql\":[\"Create table Weather (id int, recordDate date, temperature int)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"],\"database\":true,\"name\":\"rising_temperature\",\"pythondata\":[\"Weather = pd.DataFrame([], columns=['id', 'recordDate', 'temperature']).astype({'id':'Int64', 'recordDate':'datetime64[ns]', 'temperature':'Int64'})\"],\"postgresql\":[\"Create table If Not Exists Weather (id int, recordDate date, temperature int)\"],\"database_schema\":{\"Weather\":{\"id\":\"INT\",\"recordDate\":\"DATE\",\"temperature\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
@@ -68,7 +80,7 @@
"insert into Weather (id, recordDate, temperature) values ('4', '2015-01-04', '30')"
],
"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>\"]}",
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,