1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 23:41: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

@@ -6,13 +6,13 @@
"boundTopicId": null,
"title": "Fix Names in a Table",
"titleSlug": "fix-names-in-a-table",
"content": "<p>Table: <code>Users</code></p>\n\n<pre>\n+----------------+---------+\n| Column Name | Type |\n+----------------+---------+\n| user_id | int |\n| name | varchar |\n+----------------+---------+\nuser_id is the primary key for this table.\nThis table contains the ID and the name of the user. The name consists of only lowercase and uppercase characters.\n</pre>\n\n<p>&nbsp;</p>\n\n<p>Write an SQL query to fix the names so that only the first character is uppercase and the rest are lowercase.</p>\n\n<p>Return the result table ordered by <code>user_id</code>.</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> \nUsers table:\n+---------+-------+\n| user_id | name |\n+---------+-------+\n| 1 | aLice |\n| 2 | bOB |\n+---------+-------+\n<strong>Output:</strong> \n+---------+-------+\n| user_id | name |\n+---------+-------+\n| 1 | Alice |\n| 2 | Bob |\n+---------+-------+\n</pre>\n",
"content": "<p>Table: <code>Users</code></p>\n\n<pre>\n+----------------+---------+\n| Column Name | Type |\n+----------------+---------+\n| user_id | int |\n| name | varchar |\n+----------------+---------+\nuser_id is the primary key (column with unique values) for this table.\nThis table contains the ID and the name of the user. The name consists of only lowercase and uppercase characters.\n</pre>\n\n<p>&nbsp;</p>\n\n<p>Write a solution to fix the names so that only the first character is uppercase and the rest are lowercase.</p>\n\n<p>Return the result table ordered by <code>user_id</code>.</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> \nUsers table:\n+---------+-------+\n| user_id | name |\n+---------+-------+\n| 1 | aLice |\n| 2 | bOB |\n+---------+-------+\n<strong>Output:</strong> \n+---------+-------+\n| user_id | name |\n+---------+-------+\n| 1 | Alice |\n| 2 | Bob |\n+---------+-------+\n</pre>\n",
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 81,
"dislikes": 37,
"likes": 793,
"dislikes": 91,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Users\":[\"user_id\",\"name\"]},\"rows\":{\"Users\":[[1,\"aLice\"],[2,\"bOB\"]]}}",
@@ -45,14 +45,33 @@
"langSlug": "oraclesql",
"code": "/* Write your PL/SQL query statement below */\n",
"__typename": "CodeSnippetNode"
},
{
"lang": "Pandas",
"langSlug": "pythondata",
"code": "import pandas as pd\n\ndef fix_names(users: pd.DataFrame) -> pd.DataFrame:\n ",
"__typename": "CodeSnippetNode"
},
{
"lang": "PostgreSQL",
"langSlug": "postgresql",
"code": "-- Write your PostgreSQL query statement below\n",
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"14.8K\", \"totalSubmission\": \"23.4K\", \"totalAcceptedRaw\": 14766, \"totalSubmissionRaw\": 23445, \"acRate\": \"63.0%\"}",
"stats": "{\"totalAccepted\": \"166.9K\", \"totalSubmission\": \"266.5K\", \"totalAcceptedRaw\": 166940, \"totalSubmissionRaw\": 266491, \"acRate\": \"62.6%\"}",
"hints": [],
"solution": null,
"solution": {
"id": "2009",
"canSeeDetail": false,
"paidOnly": true,
"hasVideoSolution": false,
"paidOnlyVideo": true,
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "{\"headers\":{\"Users\":[\"user_id\",\"name\"]},\"rows\":{\"Users\":[[1,\"aLice\"],[2,\"bOB\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Users (user_id int, name varchar(40))\"\n ],\n \"mssql\": [\n \"Create table Users (user_id int, name varchar(40))\"\n ],\n \"oraclesql\": [\n \"Create table Users (user_id int, name varchar(40))\"\n ],\n \"database\": true\n}",
"metaData": "{\"mysql\": [\"Create table If Not Exists Users (user_id int, name varchar(40))\"], \"mssql\": [\"Create table Users (user_id int, name varchar(40))\"], \"oraclesql\": [\"Create table Users (user_id int, name varchar(40))\"], \"database\": true, \"name\": \"fix_names\", \"pythondata\": [\"Users = pd.DataFrame([], columns=['user_id', 'name']).astype({'user_id':'Int64', 'name':'object'})\"], \"postgresql\": [\"\\nCreate table If Not Exists Users (user_id int, name varchar(40))\"], \"database_schema\": {\"Users\": {\"user_id\": \"INT\", \"name\": \"VARCHAR(40)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
@@ -64,7 +83,7 @@
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"], \"pythondata\": [\"Pandas\", \"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0</p>\"], \"postgresql\": [\"PostgreSQL\", \"<p>PostgreSQL 16</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,