mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 19:31:42 +08:00
Compare commits
9 Commits
43a450d3d7
...
2024-12-20
Author | SHA1 | Date | |
---|---|---|---|
2aacdf2f93 | |||
00a21292d6 | |||
988e8e3971 | |||
721407d9be | |||
921e076c8e | |||
![]() |
76e35939b6 | ||
![]() |
fc8e794743 | ||
1bb2fbd76e | |||
![]() |
91ca37c7ef |
10
README.md
10
README.md
@@ -1,6 +1,6 @@
|
||||
# 力扣题库(完整版)
|
||||
|
||||
> 最后更新日期: **2024.07.16**
|
||||
> 最后更新日期: **2024.12.20**
|
||||
>
|
||||
> 使用脚本前请务必仔细完整阅读本 `README.md` 文件
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
|
||||
|
||||
|
||||
### 安装依赖
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 特别注意!
|
||||
|
||||
#### 版权相关
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3695",
|
||||
"questionFrontendId": "3358",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2992013,
|
||||
"title": "Books with NULL Ratings",
|
||||
"titleSlug": "books-with-null-ratings",
|
||||
"content": null,
|
||||
"translatedTitle": "评分为 NULL 的图书",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Easy",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"85\", \"totalSubmission\": \"89\", \"totalAcceptedRaw\": 85, \"totalSubmissionRaw\": 89, \"acRate\": \"95.5%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"books\":[\"book_id\",\"title\",\"author\",\"published_year\",\"rating\"]},\"rows\":{\"books\":[[1,\"The Great Gatsby\",\"F. Scott\",1925,4.5],[2,\"To Kill a Mockingbird\",\"Harper Lee\",1960,null],[3,\"Pride and Prejudice\",\"Jane Austen\",1813,4.8],[4,\"The Catcher in the Rye\",\"J.D. Salinger\",1951,null],[5,\"Animal Farm\",\"George Orwell\",1945,4.2],[6,\"Lord of the Flies\",\"William Golding\",1954,null]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table books (\\n book_id int,\\n title varchar(255),\\n author varchar(100),\\n published_year int,\\n rating decimal(3,1)\\n)\"],\"mssql\":[\"Create table books (\\n book_id int,\\n title varchar(255),\\n author varchar(100),\\n published_year int,\\n rating decimal(3,1)\\n)\"],\"oraclesql\":[\"Create table books (\\n book_id number,\\n title varchar2(255),\\n author varchar2(100),\\n published_year number,\\n rating number(3,1)\\n)\"],\"database\":true,\"name\":\"find_unrated_books\",\"postgresql\":[\"CREATE TABLE books (\\n book_id INTEGER,\\n title VARCHAR(255),\\n author VARCHAR(100),\\n published_year INTEGER,\\n rating NUMERIC(3, 1)\\n);\\n\"],\"pythondata\":[\"books = pd.DataFrame({ \\\"book_id\\\": pd.Series(dtype=\\\"int\\\"), \\\"title\\\": pd.Series(dtype=\\\"str\\\"), \\\"author\\\": pd.Series(dtype=\\\"str\\\"), \\\"published_year\\\": pd.Series(dtype=\\\"int\\\"), \\\"rating\\\": pd.Series(dtype=\\\"float\\\") })\\n\"],\"database_schema\":{\"books\":{\"book_id\":\"INT\",\"title\":\"VARCHAR(255)\",\"author\":\"VARCHAR(100)\",\"published_year\":\"INT\",\"rating\":\"DECIMAL(3, 1)\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table books (\n book_id int,\n title varchar(255),\n author varchar(100),\n published_year int,\n rating decimal(3,1)\n)",
|
||||
"Truncate table books",
|
||||
"insert into books (book_id, title, author, published_year, rating) values ('1', 'The Great Gatsby', 'F. Scott', '1925', '4.5')",
|
||||
"insert into books (book_id, title, author, published_year, rating) values ('2', 'To Kill a Mockingbird', 'Harper Lee', '1960', NULL)",
|
||||
"insert into books (book_id, title, author, published_year, rating) values ('3', 'Pride and Prejudice', 'Jane Austen', '1813', '4.8')",
|
||||
"insert into books (book_id, title, author, published_year, rating) values ('4', 'The Catcher in the Rye', 'J.D. Salinger', '1951', NULL)",
|
||||
"insert into books (book_id, title, author, published_year, rating) values ('5', 'Animal Farm', 'George Orwell', '1945', '4.2')",
|
||||
"insert into books (book_id, title, author, published_year, rating) values ('6', 'Lord of the Flies', 'William Golding', '1954', NULL)"
|
||||
],
|
||||
"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\":{\"books\":[\"book_id\",\"title\",\"author\",\"published_year\",\"rating\"]},\"rows\":{\"books\":[[1,\"The Great Gatsby\",\"F. Scott\",1925,4.5],[2,\"To Kill a Mockingbird\",\"Harper Lee\",1960,null],[3,\"Pride and Prejudice\",\"Jane Austen\",1813,4.8],[4,\"The Catcher in the Rye\",\"J.D. Salinger\",1951,null],[5,\"Animal Farm\",\"George Orwell\",1945,4.2],[6,\"Lord of the Flies\",\"William Golding\",1954,null]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3609",
|
||||
"questionFrontendId": "3293",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2920566,
|
||||
"title": "Calculate Product Final Price",
|
||||
"titleSlug": "calculate-product-final-price",
|
||||
"content": null,
|
||||
"translatedTitle": "计算产品最终价格",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"21\", \"totalSubmission\": \"24\", \"totalAcceptedRaw\": 21, \"totalSubmissionRaw\": 24, \"acRate\": \"87.5%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Products\":[\"product_id\",\"category\",\"price\"],\"Discounts\":[\"category\",\"discount\"]},\"rows\":{\"Products\":[[1,\"Electronics\",1000],[2,\"Clothing\",50],[3,\"Electronics\",1200],[4,\"Home\",500]],\"Discounts\":[[\"Electronics\",10],[\"Clothing\",20]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table if not exists Products (product_id int, category varchar(50), price int)\",\"Create table if not exists Discounts(category varchar(50), discount int)\"],\"mssql\":[\"Create table Products (product_id int, category varchar(50), price int)\",\"Create table Discounts(category varchar(50), discount int)\"],\"oraclesql\":[\"Create table Products (product_id Number, category varchar2(50), price Number)\",\"Create table Discounts(category varchar2(50), discount Number)\"],\"database\":true,\"name\":\"calculate_final_prices\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Products (\\n product_id INT,\\n category VARCHAR(50),\\n price INT\\n);\\n\",\"CREATE TABLE IF NOT EXISTS Discounts (\\n category VARCHAR(50),\\n discount INT\\n);\\n\"],\"pythondata\":[\"Products = pd.DataFrame(columns=['product_id', 'category', 'price'], dtype=int)\\n\",\"Discounts = pd.DataFrame({'category': pd.Series(dtype='str'), 'discount': pd.Series(dtype='int')})\\n\"],\"database_schema\":{\"Products\":{\"product_id\":\"INT\",\"category\":\"VARCHAR(50)\",\"price\":\"INT\"},\"Discounts\":{\"category\":\"VARCHAR(50)\",\"discount\":\"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table if not exists Products (product_id int, category varchar(50), price int)",
|
||||
"Create table if not exists Discounts(category varchar(50), discount int)",
|
||||
"Truncate table Products",
|
||||
"insert into Products (product_id, category, price) values ('1', 'Electronics', '1000')",
|
||||
"insert into Products (product_id, category, price) values ('2', 'Clothing', '50')",
|
||||
"insert into Products (product_id, category, price) values ('3', 'Electronics', '1200')",
|
||||
"insert into Products (product_id, category, price) values ('4', 'Home', '500')",
|
||||
"Truncate table Discounts",
|
||||
"insert into Discounts (category, discount) values ('Electronics', '10')",
|
||||
"insert into Discounts (category, discount) values ('Clothing', '20')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"Products\":[\"product_id\",\"category\",\"price\"],\"Discounts\":[\"category\",\"discount\"]},\"rows\":{\"Products\":[[1,\"Electronics\",1000],[2,\"Clothing\",50],[3,\"Electronics\",1200],[4,\"Home\",500]],\"Discounts\":[[\"Electronics\",10],[\"Clothing\",20]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3549",
|
||||
"questionFrontendId": "3236",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2861886,
|
||||
"title": "CEO Subordinate Hierarchy",
|
||||
"titleSlug": "ceo-subordinate-hierarchy",
|
||||
"content": null,
|
||||
"translatedTitle": "首席执行官下属层级",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"45\", \"totalSubmission\": \"57\", \"totalAcceptedRaw\": 45, \"totalSubmissionRaw\": 57, \"acRate\": \"78.9%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Employees\":[\"employee_id\",\"employee_name\",\"manager_id\",\"salary\"]},\"rows\":{\"Employees\":[[1,\"Alice\",null,150000],[2,\"Bob\",1,120000],[3,\"Charlie\",1,110000],[4,\"David\",2,105000],[5,\"Eve\",2,100000],[6,\"Frank\",3,95000],[7,\"Grace\",3,98000],[8,\"Helen\",5,90000]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table if not exists employees(employee_id int, employee_name varchar(100), manager_id int, salary int)\"],\"mssql\":[\"Create table employees(employee_id int, employee_name varchar(100), manager_id int, salary int)\"],\"oraclesql\":[\"Create table employees(employee_id NUMBER, employee_name varchar2(100), manager_id NUMBER, salary NUMBER)\"],\"database\":true,\"name\":\"find_subordinates\",\"manual\":false,\"postgresql\":[\"CREATE TABLE IF NOT EXISTS employees (\\n employee_id INT,\\n employee_name VARCHAR(100),\\n manager_id INT,\\n salary INT\\n);\\n\"],\"pythondata\":[\"Employees = pd.DataFrame(columns=['employee_id', 'employee_name', 'manager_id', 'salary']).astype({\\n 'employee_id': pd.Int64Dtype(),\\n 'employee_name': 'str',\\n 'manager_id': pd.Int64Dtype(),\\n 'salary': pd.Int64Dtype()\\n})\"],\"database_schema\":{\"employees\":{\"employee_id\":\"INT\",\"employee_name\":\"VARCHAR(100)\",\"manager_id\":\"INT\",\"salary\":\"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table if not exists employees(employee_id int, employee_name varchar(100), manager_id int, salary int)",
|
||||
"Truncate table Employees",
|
||||
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('1', 'Alice', 'None', '150000')",
|
||||
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('2', 'Bob', '1', '120000')",
|
||||
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('3', 'Charlie', '1', '110000')",
|
||||
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('4', 'David', '2', '105000')",
|
||||
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('5', 'Eve', '2', '100000')",
|
||||
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('6', 'Frank', '3', '95000')",
|
||||
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('7', 'Grace', '3', '98000')",
|
||||
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('8', 'Helen', '5', '90000')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"Employees\":[\"employee_id\",\"employee_name\",\"manager_id\",\"salary\"]},\"rows\":{\"Employees\":[[1,\"Alice\",null,150000],[2,\"Bob\",1,120000],[3,\"Charlie\",1,110000],[4,\"David\",2,105000],[5,\"Eve\",2,100000],[6,\"Frank\",3,95000],[7,\"Grace\",3,98000],[8,\"Helen\",5,90000]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3539",
|
||||
"questionFrontendId": "3230",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2852426,
|
||||
"title": "Customer Purchasing Behavior Analysis",
|
||||
"titleSlug": "customer-purchasing-behavior-analysis",
|
||||
"content": null,
|
||||
"translatedTitle": "客户购买行为分析",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"55\", \"totalSubmission\": \"162\", \"totalAcceptedRaw\": 55, \"totalSubmissionRaw\": 162, \"acRate\": \"34.0%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Transactions\":[\"transaction_id\",\"customer_id\",\"product_id\",\"transaction_date\",\"amount\"],\"Products\":[\"product_id\",\"category\",\"price\"]},\"rows\":{\"Transactions\":[[1,101,1,\"2023-01-01\",100.00],[2,101,2,\"2023-01-15\",150.00],[3,102,1,\"2023-01-01\",100.00],[4,102,3,\"2023-01-22\",200.00],[5,101,3,\"2023-02-10\",200.00]],\"Products\":[[1,\"A\",100.00],[2,\"B\",150.00],[3,\"C\",200.00]]}}",
|
||||
"metaData": "{\"mysql\":[\"CREATE TABLE if not exists Transactions (\\n transaction_id INT,\\n customer_id INT,\\n product_id INT,\\n transaction_date DATE,\\n amount DECIMAL(10, 2)\\n)\",\"CREATE TABLE if not exists Products (\\n product_id INT ,\\n category VARCHAR(255),\\n price DECIMAL(10, 2)\\n)\\n\"],\"mssql\":[\"CREATE TABLE Transactions (\\n transaction_id INT ,\\n customer_id INT,\\n product_id INT,\\n transaction_date DATE,\\n amount DECIMAL(10, 2)\\n)\\n\",\"\\nCREATE TABLE Products (\\n product_id INT ,\\n category VARCHAR(255),\\n price DECIMAL(10, 2)\\n)\"],\"oraclesql\":[\"CREATE TABLE Transactions (\\n transaction_id NUMBER ,\\n customer_id NUMBER,\\n product_id NUMBER,\\n transaction_date DATE,\\n amount NUMBER(10, 2)\\n)\",\"CREATE TABLE Products (\\n product_id NUMBER ,\\n category VARCHAR2(255),\\n price NUMBER(10, 2)\\n)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"],\"database\":true,\"name\":\"analyze_customer_behavior\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Transactions (\\n transaction_id INTEGER,\\n customer_id INTEGER,\\n product_id INTEGER,\\n transaction_date DATE,\\n amount NUMERIC(10, 2)\\n);\\n\",\"CREATE TABLE IF NOT EXISTS Products (\\n product_id INTEGER,\\n category VARCHAR(255),\\n price NUMERIC(10, 2)\\n);\\n\"],\"pythondata\":[\"Transactions = pd.DataFrame(columns=['transaction_id', 'customer_id', 'product_id', 'transaction_date', 'amount']).astype({'transaction_id': 'int', 'customer_id': 'int', 'product_id': 'int', 'transaction_date': 'datetime64[ns]', 'amount': 'float'})\",\"Products = pd.DataFrame(columns=['product_id', 'category', 'price']).astype({'product_id': 'int', 'category': 'str', 'price': 'float'})\"],\"database_schema\":{\"Transactions\":{\"transaction_id\":\"INT\",\"customer_id\":\"INT\",\"product_id\":\"INT\",\"transaction_date\":\"DATE\",\"amount\":\"DECIMAL(10, 2)\"},\"Products\":{\"product_id\":\"INT\",\"category\":\"VARCHAR(255)\",\"price\":\"DECIMAL(10, 2)\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"CREATE TABLE if not exists Transactions (\n transaction_id INT,\n customer_id INT,\n product_id INT,\n transaction_date DATE,\n amount DECIMAL(10, 2)\n)",
|
||||
"CREATE TABLE if not exists Products (\n product_id INT ,\n category VARCHAR(255),\n price DECIMAL(10, 2)\n)\n",
|
||||
"Truncate table Transactions",
|
||||
"insert into Transactions (transaction_id, customer_id, product_id, transaction_date, amount) values ('1', '101', '1', '2023-01-01', '100.0')",
|
||||
"insert into Transactions (transaction_id, customer_id, product_id, transaction_date, amount) values ('2', '101', '2', '2023-01-15', '150.0')",
|
||||
"insert into Transactions (transaction_id, customer_id, product_id, transaction_date, amount) values ('3', '102', '1', '2023-01-01', '100.0')",
|
||||
"insert into Transactions (transaction_id, customer_id, product_id, transaction_date, amount) values ('4', '102', '3', '2023-01-22', '200.0')",
|
||||
"insert into Transactions (transaction_id, customer_id, product_id, transaction_date, amount) values ('5', '101', '3', '2023-02-10', '200.0')",
|
||||
"Truncate table Products",
|
||||
"insert into Products (product_id, category, price) values ('1', 'A', '100.0')",
|
||||
"insert into Products (product_id, category, price) values ('2', 'B', '150.0')",
|
||||
"insert into Products (product_id, category, price) values ('3', 'C', '200.0')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"Transactions\":[\"transaction_id\",\"customer_id\",\"product_id\",\"transaction_date\",\"amount\"],\"Products\":[\"product_id\",\"category\",\"price\"]},\"rows\":{\"Transactions\":[[1,101,1,\"2023-01-01\",100.00],[2,101,2,\"2023-01-15\",150.00],[3,102,1,\"2023-01-01\",100.00],[4,102,3,\"2023-01-22\",200.00],[5,101,3,\"2023-02-10\",200.00]],\"Products\":[[1,\"A\",100.00],[2,\"B\",150.00],[3,\"C\",200.00]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3589",
|
||||
"questionFrontendId": "3278",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2900887,
|
||||
"title": "Find Candidates for Data Scientist Position II",
|
||||
"titleSlug": "find-candidates-for-data-scientist-position-ii",
|
||||
"content": null,
|
||||
"translatedTitle": "寻找数据科学家职位的候选人 II",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"70\", \"totalSubmission\": \"132\", \"totalAcceptedRaw\": 70, \"totalSubmissionRaw\": 132, \"acRate\": \"53.0%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Candidates\":[\"candidate_id\",\"skill\",\"proficiency\"],\"Projects\":[\"project_id\",\"skill\",\"importance\"]},\"rows\":{\"Candidates\":[[101,\"Python\",5],[101,\"Tableau\",3],[101,\"PostgreSQL\",4],[101,\"TensorFlow\",2],[102,\"Python\",4],[102,\"Tableau\",5],[102,\"PostgreSQL\",4],[102,\"R\",4],[103,\"Python\",3],[103,\"Tableau\",5],[103,\"PostgreSQL\",5],[103,\"Spark\",4]],\"Projects\":[[501,\"Python\",4],[501,\"Tableau\",3],[501,\"PostgreSQL\",5],[502,\"Python\",3],[502,\"Tableau\",4],[502,\"R\",2]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table if not exists Candidates(candidate_id int, skill varchar(50), proficiency int)\",\"Create table if not exists Projects( project_id int, skill varchar(50), importance int)\"],\"mssql\":[\"Create table Candidates(candidate_id int, skill varchar(50), proficiency int)\",\"Create table Projects( project_id int, skill varchar(50), importance int)\"],\"oraclesql\":[\"Create table Candidates(candidate_id number, skill varchar2(50), proficiency number)\",\"Create table Projects(project_id number, skill varchar2(50), importance number)\"],\"database\":true,\"name\":\"find_best_candidates\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Candidates (\\n candidate_id INT,\\n skill VARCHAR(50),\\n proficiency INT\\n);\\n\",\"CREATE TABLE IF NOT EXISTS Projects (\\n project_id INT,\\n skill VARCHAR(50),\\n importance INT\\n);\\n\"],\"pythondata\":[\"Candidates = pd.DataFrame({\\n 'candidate_id': pd.Series(dtype='int'),\\n 'skill': pd.Series(dtype='str'),\\n 'proficiency': pd.Series(dtype='int')\\n})\",\"Projects = pd.DataFrame({\\n 'project_id': pd.Series(dtype='int'),\\n 'skill': pd.Series(dtype='str'),\\n 'importance': pd.Series(dtype='int')\\n})\"],\"database_schema\":{\"Candidates\":{\"candidate_id\":\"INT\",\"skill\":\"VARCHAR(50)\",\"proficiency\":\"INT\"},\"Projects\":{\"project_id\":\"INT\",\"skill\":\"VARCHAR(50)\",\"importance\":\"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table if not exists Candidates(candidate_id int, skill varchar(50), proficiency int)",
|
||||
"Create table if not exists Projects( project_id int, skill varchar(50), importance int)",
|
||||
"Truncate table Candidates",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('101', 'Python', '5')",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('101', 'Tableau', '3')",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('101', 'PostgreSQL', '4')",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('101', 'TensorFlow', '2')",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('102', 'Python', '4')",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('102', 'Tableau', '5')",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('102', 'PostgreSQL', '4')",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('102', 'R', '4')",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('103', 'Python', '3')",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('103', 'Tableau', '5')",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('103', 'PostgreSQL', '5')",
|
||||
"insert into Candidates (candidate_id, skill, proficiency) values ('103', 'Spark', '4')",
|
||||
"Truncate table Projects",
|
||||
"insert into Projects (project_id, skill, importance) values ('501', 'Python', '4')",
|
||||
"insert into Projects (project_id, skill, importance) values ('501', 'Tableau', '3')",
|
||||
"insert into Projects (project_id, skill, importance) values ('501', 'PostgreSQL', '5')",
|
||||
"insert into Projects (project_id, skill, importance) values ('502', 'Python', '3')",
|
||||
"insert into Projects (project_id, skill, importance) values ('502', 'Tableau', '4')",
|
||||
"insert into Projects (project_id, skill, importance) values ('502', 'R', '2')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"Candidates\":[\"candidate_id\",\"skill\",\"proficiency\"],\"Projects\":[\"project_id\",\"skill\",\"importance\"]},\"rows\":{\"Candidates\":[[101,\"Python\",5],[101,\"Tableau\",3],[101,\"PostgreSQL\",4],[101,\"TensorFlow\",2],[102,\"Python\",4],[102,\"Tableau\",5],[102,\"PostgreSQL\",4],[102,\"R\",4],[103,\"Python\",3],[103,\"Tableau\",5],[103,\"PostgreSQL\",5],[103,\"Spark\",4]],\"Projects\":[[501,\"Python\",4],[501,\"Tableau\",3],[501,\"PostgreSQL\",5],[502,\"Python\",3],[502,\"Tableau\",4],[502,\"R\",2]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3650",
|
||||
"questionFrontendId": "3328",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2958682,
|
||||
"title": "Find Cities in Each State II",
|
||||
"titleSlug": "find-cities-in-each-state-ii",
|
||||
"content": null,
|
||||
"translatedTitle": "查找每个州的城市 II",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"58\", \"totalSubmission\": \"81\", \"totalAcceptedRaw\": 58, \"totalSubmissionRaw\": 81, \"acRate\": \"71.6%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"cities\":[\"state\",\"city\"]},\"rows\":{\"cities\":[[\"New York\",\"New York City\"],[\"New York\",\"Newark\"],[\"New York\",\"Buffalo\"],[\"New York\",\"Rochester\"],[\"California\",\"San Francisco\"],[\"California\",\"Sacramento\"],[\"California\",\"San Diego\"],[\"California\",\"Los Angeles\"],[\"Texas\",\"Tyler\"],[\"Texas\",\"Temple\"],[\"Texas\",\"Taylor\"],[\"Texas\",\"Dallas\"],[\"Pennsylvania\",\"Philadelphia\"],[\"Pennsylvania\",\"Pittsburgh\"],[\"Pennsylvania\",\"Pottstown\"]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table if not exists cities( state varchar(100),city varchar(100))\"],\"mssql\":[\"Create table cities( state varchar(100),city varchar(100))\"],\"oraclesql\":[\"Create table cities( state varchar2(100),city varchar2(100))\"],\"database\":true,\"name\":\"state_city_analysis\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS cities (\\n state VARCHAR(100),\\n city VARCHAR(100)\\n);\\n\"],\"pythondata\":[\"cities = pd.DataFrame({\\n 'state': pd.Series(dtype='str'),\\n 'city': pd.Series(dtype='str')\\n})\"],\"database_schema\":{\"cities\":{\"state\":\"VARCHAR(100)\",\"city\":\"VARCHAR(100)\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table if not exists cities( state varchar(100),city varchar(100))",
|
||||
"Truncate table cities",
|
||||
"insert into cities (state, city) values ('New York', 'New York City')",
|
||||
"insert into cities (state, city) values ('New York', 'Newark')",
|
||||
"insert into cities (state, city) values ('New York', 'Buffalo')",
|
||||
"insert into cities (state, city) values ('New York', 'Rochester')",
|
||||
"insert into cities (state, city) values ('California', 'San Francisco')",
|
||||
"insert into cities (state, city) values ('California', 'Sacramento')",
|
||||
"insert into cities (state, city) values ('California', 'San Diego')",
|
||||
"insert into cities (state, city) values ('California', 'Los Angeles')",
|
||||
"insert into cities (state, city) values ('Texas', 'Tyler')",
|
||||
"insert into cities (state, city) values ('Texas', 'Temple')",
|
||||
"insert into cities (state, city) values ('Texas', 'Taylor')",
|
||||
"insert into cities (state, city) values ('Texas', 'Dallas')",
|
||||
"insert into cities (state, city) values ('Pennsylvania', 'Philadelphia')",
|
||||
"insert into cities (state, city) values ('Pennsylvania', 'Pittsburgh')",
|
||||
"insert into cities (state, city) values ('Pennsylvania', 'Pottstown')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"cities\":[\"state\",\"city\"]},\"rows\":{\"cities\":[[\"New York\",\"New York City\"],[\"New York\",\"Newark\"],[\"New York\",\"Buffalo\"],[\"New York\",\"Rochester\"],[\"California\",\"San Francisco\"],[\"California\",\"Sacramento\"],[\"California\",\"San Diego\"],[\"California\",\"Los Angeles\"],[\"Texas\",\"Tyler\"],[\"Texas\",\"Temple\"],[\"Texas\",\"Taylor\"],[\"Texas\",\"Dallas\"],[\"Pennsylvania\",\"Philadelphia\"],[\"Pennsylvania\",\"Pittsburgh\"],[\"Pennsylvania\",\"Pottstown\"]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3585",
|
||||
"questionFrontendId": "3268",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2895162,
|
||||
"title": "Find Overlapping Shifts II",
|
||||
"titleSlug": "find-overlapping-shifts-ii",
|
||||
"content": null,
|
||||
"translatedTitle": "查找重叠的班次 II",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"90\", \"totalSubmission\": \"127\", \"totalAcceptedRaw\": 90, \"totalSubmissionRaw\": 127, \"acRate\": \"70.9%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"EmployeeShifts\":[\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"EmployeeShifts\":[[1,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"],[1,\"2023-10-01 15:00:00\",\"2023-10-01 23:00:00\"],[1,\"2023-10-01 16:00:00\",\"2023-10-02 00:00:00\"],[2,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"],[2,\"2023-10-01 11:00:00\",\"2023-10-01 19:00:00\"],[3,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table if not exists EmployeeShifts(employee_id int, start_time datetime, end_time datetime)\"],\"mssql\":[\"Create table EmployeeShifts(employee_id int, start_time datetime, end_time datetime)\"],\"oraclesql\":[\"Create table EmployeeShifts(employee_id number, start_time date, end_time date)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"],\"database\":true,\"name\":\"calculate_shift_overlaps\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS EmployeeShifts (\\n employee_id INT,\\n start_time TIMESTAMP,\\n end_time TIMESTAMP\\n);\\n\"],\"pythondata\":[\"EmployeeShifts = pd.DataFrame({\\n 'employee_id': pd.Series(dtype='int'),\\n 'start_time': pd.Series(dtype='datetime64[ns]'),\\n 'end_time': pd.Series(dtype='datetime64[ns]')\\n})\"],\"database_schema\":{\"EmployeeShifts\":{\"employee_id\":\"INT\",\"start_time\":\"DATETIME\",\"end_time\":\"DATETIME\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table if not exists EmployeeShifts(employee_id int, start_time datetime, end_time datetime)",
|
||||
"Truncate table EmployeeShifts",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '2023-10-01 09:00:00', '2023-10-01 17:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '2023-10-01 15:00:00', '2023-10-01 23:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '2023-10-01 16:00:00', '2023-10-02 00:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('2', '2023-10-01 09:00:00', '2023-10-01 17:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('2', '2023-10-01 11:00:00', '2023-10-01 19:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('3', '2023-10-01 09:00:00', '2023-10-01 17:00:00')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\": {\"EmployeeShifts\":[\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"EmployeeShifts\":[[1,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"],[1,\"2023-10-01 15:00:00\",\"2023-10-01 23:00:00\"],[1,\"2023-10-01 16:00:00\",\"2023-10-02 00:00:00\"],[2,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"],[2,\"2023-10-01 11:00:00\",\"2023-10-01 19:00:00\"],[3,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3574",
|
||||
"questionFrontendId": "3262",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2887671,
|
||||
"title": "Find Overlapping Shifts",
|
||||
"titleSlug": "find-overlapping-shifts",
|
||||
"content": null,
|
||||
"translatedTitle": "查找重叠的班次",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"49\", \"totalSubmission\": \"67\", \"totalAcceptedRaw\": 49, \"totalSubmissionRaw\": 67, \"acRate\": \"73.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"EmployeeShifts\":[\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"EmployeeShifts\":[[1,\"08:00:00\",\"12:00:00\"],[1,\"11:00:00\",\"15:00:00\"],[1,\"14:00:00\",\"18:00:00\"],[2,\"09:00:00\",\"17:00:00\"],[2,\"16:00:00\",\"20:00:00\"],[3,\"10:00:00\",\"12:00:00\"],[3,\"13:00:00\",\"15:00:00\"],[3,\"16:00:00\",\"18:00:00\"],[4,\"08:00:00\",\"10:00:00\"],[4,\"09:00:00\",\"11:00:00\"]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table if not exists EmployeeShifts(employee_id int, start_time time, end_time time)\"],\"mssql\":[\"Create table EmployeeShifts(employee_id int, start_time time, end_time time)\"],\"oraclesql\":[\"Create table EmployeeShifts(employee_id number, start_time date, end_time date)\",\"ALTER SESSION SET nls_date_format='HH24:MI:SS'\"],\"database\":true,\"name\":\"find_overlapping_shifts\",\"pythondata\":[\"EmployeeShifts = pd.DataFrame({\\n 'employee_id': pd.Series(dtype='int'),\\n 'start_time': pd.Series(dtype='datetime64[ns]'),\\n 'end_time': pd.Series(dtype='datetime64[ns]')\\n})\"],\"postgresql\":[\"CREATE TABLE IF NOT EXISTS EmployeeShifts (\\n employee_id INT,\\n start_time TIME,\\n end_time TIME\\n);\\n\"],\"database_schema\":{\"EmployeeShifts\":{\"employee_id\":\"INT\",\"start_time\":\"TIME\",\"end_time\":\"TIME\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table if not exists EmployeeShifts(employee_id int, start_time time, end_time time)",
|
||||
"Truncate table EmployeeShifts",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '08:00:00', '12:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '11:00:00', '15:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '14:00:00', '18:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('2', '09:00:00', '17:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('2', '16:00:00', '20:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('3', '10:00:00', '12:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('3', '13:00:00', '15:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('3', '16:00:00', '18:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('4', '08:00:00', '10:00:00')",
|
||||
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('4', '09:00:00', '11:00:00')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"EmployeeShifts\":[\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"EmployeeShifts\":[[1,\"08:00:00\",\"12:00:00\"],[1,\"11:00:00\",\"15:00:00\"],[1,\"14:00:00\",\"18:00:00\"],[2,\"09:00:00\",\"17:00:00\"],[2,\"16:00:00\",\"20:00:00\"],[3,\"10:00:00\",\"12:00:00\"],[3,\"13:00:00\",\"15:00:00\"],[3,\"16:00:00\",\"18:00:00\"],[4,\"08:00:00\",\"10:00:00\"],[4,\"09:00:00\",\"11:00:00\"]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
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
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3624",
|
||||
"questionFrontendId": "3308",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2935114,
|
||||
"title": "Find Top Performing Driver",
|
||||
"titleSlug": "find-top-performing-driver",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"40\", \"totalSubmission\": \"66\", \"totalAcceptedRaw\": 40, \"totalSubmissionRaw\": 66, \"acRate\": \"60.6%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Drivers\":[\"driver_id\",\"name\",\"age\",\"experience\",\"accidents\"],\"Vehicles\":[\"vehicle_id\",\"driver_id\",\"model\",\"fuel_type\",\"mileage\"],\"Trips\":[\"trip_id\",\"vehicle_id\",\"distance\",\"duration\",\"rating\"]},\"rows\":{\"Drivers\":[[1,\"Alice\",34,10,1],[2,\"Bob\",45,20,3],[3,\"Charlie\",28,5,0]],\"Vehicles\":[[100,1,\"Sedan\",\"Gasoline\",20000],[101,2,\"SUV\",\"Electric\",30000],[102,3,\"Coupe\",\"Gasoline\",15000]],\"Trips\":[[201,100,50,30,5],[202,100,30,20,4],[203,101,100,60,4],[204,101,80,50,5],[205,102,40,30,5],[206,102,60,40,5]]}}",
|
||||
"metaData": "{\"mysql\":[\"CREATE TABLE If not exists Drivers (\\n driver_id INT ,\\n name VARCHAR(100),\\n age INT,\\n experience INT,\\n accidents INT\\n)\",\"CREATE TABLE If not exists Vehicles (\\n vehicle_id INT ,\\n driver_id INT,\\n model VARCHAR(100),\\n fuel_type VARCHAR(50),\\n mileage INT)\",\"CREATE TABLE If not exists Trips (\\n trip_id INT ,\\n vehicle_id INT,\\n distance INT,\\n duration INT,\\n rating INT\\n)\"],\"mssql\":[\"CREATE TABLE Drivers (\\n driver_id INT,\\n name NVARCHAR(100),\\n age INT,\\n experience INT,\\n accidents INT\\n)\",\"CREATE TABLE Vehicles (\\n vehicle_id INT,\\n driver_id INT,\\n model NVARCHAR(100),\\n fuel_type NVARCHAR(50),\\n mileage INT\\n)\",\"CREATE TABLE Trips (\\n trip_id INT,\\n vehicle_id INT,\\n distance INT,\\n duration INT,\\n rating INT CHECK (rating BETWEEN 1 AND 5)\\n)\"],\"oraclesql\":[\"CREATE TABLE Drivers (\\n driver_id NUMBER,\\n name VARCHAR2(100),\\n age NUMBER,\\n experience NUMBER,\\n accidents NUMBER\\n)\",\"CREATE TABLE Vehicles (\\n vehicle_id NUMBER,\\n driver_id NUMBER,\\n model VARCHAR2(100),\\n fuel_type VARCHAR2(50),\\n mileage NUMBER\\n)\",\"\\nCREATE TABLE Trips (\\n trip_id NUMBER,\\n vehicle_id NUMBER,\\n distance NUMBER,\\n duration NUMBER,\\n rating NUMBER )\"],\"database\":true,\"name\":\"get_top_performing_drivers\",\"pythondata\":[\"Drivers = pd.DataFrame({\\n 'driver_id': pd.Series(dtype='int'),\\n 'name': pd.Series(dtype='str'),\\n 'age': pd.Series(dtype='int'),\\n 'experience': pd.Series(dtype='int'),\\n 'accidents': pd.Series(dtype='int')\\n})\",\"Vehicles = pd.DataFrame({\\n 'vehicle_id': pd.Series(dtype='int'),\\n 'driver_id': pd.Series(dtype='int'),\\n 'model': pd.Series(dtype='str'),\\n 'fuel_type': pd.Series(dtype='str'),\\n 'mileage': pd.Series(dtype='int')\\n})\",\"Trips = pd.DataFrame({\\n 'trip_id': pd.Series(dtype='int'),\\n 'vehicle_id': pd.Series(dtype='int'),\\n 'distance': pd.Series(dtype='int'),\\n 'duration': pd.Series(dtype='int'),\\n 'rating': pd.Series(dtype='int')\\n})\"],\"postgresql\":[\"CREATE TABLE Drivers (\\n driver_id SERIAL PRIMARY KEY,\\n name VARCHAR(100),\\n age INT,\\n experience INT,\\n accidents INT\\n);\\n\",\"CREATE TABLE Vehicles (\\n vehicle_id SERIAL PRIMARY KEY,\\n driver_id INT,\\n model VARCHAR(100),\\n fuel_type VARCHAR(50),\\n mileage INT\\n);\\n\",\"CREATE TABLE Trips (\\n trip_id SERIAL PRIMARY KEY,\\n vehicle_id INT,\\n distance INT,\\n duration INT,\\n rating INT CHECK (rating BETWEEN 1 AND 5)\\n);\\n\",\"TRUNCATE TABLE Vehicles, Drivers;\\n\"],\"database_schema\":{\"Drivers\":{\"driver_id\":\"INT\",\"name\":\"VARCHAR(100)\",\"age\":\"INT\",\"experience\":\"INT\",\"accidents\":\"INT\"},\"Vehicles\":{\"vehicle_id\":\"INT\",\"driver_id\":\"INT\",\"model\":\"VARCHAR(100)\",\"fuel_type\":\"VARCHAR(50)\",\"mileage\":\"INT\"},\"Trips\":{\"trip_id\":\"INT\",\"vehicle_id\":\"INT\",\"distance\":\"INT\",\"duration\":\"INT\",\"rating\":\"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"CREATE TABLE If not exists Drivers (\n driver_id INT ,\n name VARCHAR(100),\n age INT,\n experience INT,\n accidents INT\n)",
|
||||
"CREATE TABLE If not exists Vehicles (\n vehicle_id INT ,\n driver_id INT,\n model VARCHAR(100),\n fuel_type VARCHAR(50),\n mileage INT)",
|
||||
"CREATE TABLE If not exists Trips (\n trip_id INT ,\n vehicle_id INT,\n distance INT,\n duration INT,\n rating INT\n)",
|
||||
"Truncate table Drivers",
|
||||
"insert into Drivers (driver_id, name, age, experience, accidents) values ('1', 'Alice', '34', '10', '1')",
|
||||
"insert into Drivers (driver_id, name, age, experience, accidents) values ('2', 'Bob', '45', '20', '3')",
|
||||
"insert into Drivers (driver_id, name, age, experience, accidents) values ('3', 'Charlie', '28', '5', '0')",
|
||||
"Truncate table Vehicles",
|
||||
"insert into Vehicles (vehicle_id, driver_id, model, fuel_type, mileage) values ('100', '1', 'Sedan', 'Gasoline', '20000')",
|
||||
"insert into Vehicles (vehicle_id, driver_id, model, fuel_type, mileage) values ('101', '2', 'SUV', 'Electric', '30000')",
|
||||
"insert into Vehicles (vehicle_id, driver_id, model, fuel_type, mileage) values ('102', '3', 'Coupe', 'Gasoline', '15000')",
|
||||
"Truncate table Trips",
|
||||
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('201', '100', '50', '30', '5')",
|
||||
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('202', '100', '30', '20', '4')",
|
||||
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('203', '101', '100', '60', '4')",
|
||||
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('204', '101', '80', '50', '5')",
|
||||
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('205', '102', '40', '30', '5')",
|
||||
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('206', '102', '60', '40', '5')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"Drivers\":[\"driver_id\",\"name\",\"age\",\"experience\",\"accidents\"],\"Vehicles\":[\"vehicle_id\",\"driver_id\",\"model\",\"fuel_type\",\"mileage\"],\"Trips\":[\"trip_id\",\"vehicle_id\",\"distance\",\"duration\",\"rating\"]},\"rows\":{\"Drivers\":[[1,\"Alice\",34,10,1],[2,\"Bob\",45,20,3],[3,\"Charlie\",28,5,0]],\"Vehicles\":[[100,1,\"Sedan\",\"Gasoline\",20000],[101,2,\"SUV\",\"Electric\",30000],[102,3,\"Coupe\",\"Gasoline\",15000]],\"Trips\":[[201,100,50,30,5],[202,100,30,20,4],[203,101,100,60,4],[204,101,80,50,5],[205,102,40,30,5],[206,102,60,40,5]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3703",
|
||||
"questionFrontendId": "3368",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2999592,
|
||||
"title": "First Letter Capitalization",
|
||||
"titleSlug": "first-letter-capitalization",
|
||||
"content": null,
|
||||
"translatedTitle": "首字母大写",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"32\", \"totalSubmission\": \"34\", \"totalAcceptedRaw\": 32, \"totalSubmissionRaw\": 34, \"acRate\": \"94.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"user_content\":[\"content_id\",\"content_text\"]},\"rows\":{\"user_content\":[[1,\"hello world of SQL\"],[2,\"the QUICK brown fox\"],[3,\"data science AND machine learning\"],[4,\"TOP rated programming BOOKS\"]]}}",
|
||||
"metaData": "{\"mysql\":[\"CREATE TABLE If not exists user_content (\\n content_id INT,\\n content_text VARCHAR(255)\\n)\"],\"mssql\":[\"CREATE TABLE user_content (\\n content_id INT,\\n content_text VARCHAR(255)\\n)\"],\"oraclesql\":[\"CREATE TABLE user_content (\\n content_id NUMBER,\\n content_text VARCHAR2(255)\\n)\"],\"database\":true,\"name\":\"process_text\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS user_content (\\n content_id SERIAL PRIMARY KEY,\\n content_text VARCHAR(255)\\n);\\n\"],\"pythondata\":[\"user_content = pd.DataFrame({\\n 'content_id': pd.Series(dtype='int'),\\n 'content_text': pd.Series(dtype='str')\\n})\"],\"database_schema\":{\"user_content\":{\"content_id\":\"INT\",\"content_text\":\"VARCHAR(255)\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"CREATE TABLE If not exists user_content (\n content_id INT,\n content_text VARCHAR(255)\n)",
|
||||
"Truncate table user_content",
|
||||
"insert into user_content (content_id, content_text) values ('1', 'hello world of SQL')",
|
||||
"insert into user_content (content_id, content_text) values ('2', 'the QUICK brown fox')",
|
||||
"insert into user_content (content_id, content_text) values ('3', 'data science AND machine learning')",
|
||||
"insert into user_content (content_id, content_text) values ('4', 'TOP rated programming BOOKS')"
|
||||
],
|
||||
"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\":{\"user_content\":[\"content_id\",\"content_text\"]},\"rows\":{\"user_content\":[[1,\"hello world of SQL\"],[2,\"the QUICK brown fox\"],[3,\"data science AND machine learning\"],[4,\"TOP rated programming BOOKS\"]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3726",
|
||||
"questionFrontendId": "3390",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 3021381,
|
||||
"title": "Longest Team Pass Streak",
|
||||
"titleSlug": "longest-team-pass-streak",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"13\", \"totalSubmission\": \"22\", \"totalAcceptedRaw\": 13, \"totalSubmissionRaw\": 22, \"acRate\": \"59.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Teams\":[\"player_id\",\"team_name\"],\"Passes\":[\"pass_from\",\"time_stamp\",\"pass_to\"]},\"rows\":{\"Teams\":[[1,\"Arsenal\"],[2,\"Arsenal\"],[3,\"Arsenal\"],[4,\"Arsenal\"],[5,\"Chelsea\"],[6,\"Chelsea\"],[7,\"Chelsea\"],[8,\"Chelsea\"]],\"Passes\":[[1,\"00:05\",2],[2,\"00:07\",3],[3,\"00:08\",4],[4,\"00:10\",5],[6,\"00:15\",7],[7,\"00:17\",8],[8,\"00:20\",6],[6,\"00:22\",5],[1,\"00:25\",2],[2,\"00:27\",3]]}}",
|
||||
"metaData": "{\"mysql\":[\"CREATE TABLE If not exists Teams (\\n player_id INT,\\n team_name VARCHAR(100)\\n)\\n\\n\",\"CREATE TABLE if not exists Passes (\\n pass_from INT,\\n time_stamp VARCHAR(5),\\n pass_to INT\\n)\"],\"mssql\":[\"CREATE TABLE Teams (\\n player_id INT,\\n team_name VARCHAR(100)\\n)\\n\",\"\\nCREATE TABLE Passes (\\n pass_from INT,\\n time_stamp VARCHAR(5),\\n pass_to INT\\n)\"],\"oraclesql\":[\"CREATE TABLE Teams (\\n player_id NUMBER,\\n team_name VARCHAR2(100)\\n)\\n\\n\",\"CREATE TABLE Passes (\\n pass_from NUMBER,\\n time_stamp VARCHAR2(5),\\n pass_to NUMBER\\n)\"],\"database\":true,\"name\":\"calculate_longest_streaks\",\"pythondata\":[\"Teams = pd.DataFrame(columns=[\\\"player_id\\\", \\\"team_name\\\"]).astype({\\\"player_id\\\": \\\"int\\\", \\\"team_name\\\": \\\"string\\\"})\\n\",\"Passes = pd.DataFrame(columns=[\\\"pass_from\\\", \\\"time_stamp\\\", \\\"pass_to\\\"]).astype({\\\"pass_from\\\": \\\"int\\\", \\\"time_stamp\\\": \\\"string\\\", \\\"pass_to\\\": \\\"int\\\"})\\n\"],\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Teams (\\n player_id INTEGER,\\n team_name VARCHAR(100)\\n);\\n\",\"CREATE TABLE IF NOT EXISTS Passes (\\n pass_from INTEGER,\\n time_stamp VARCHAR(5),\\n pass_to INTEGER\\n);\\n\"],\"database_schema\":{\"Teams\":{\"player_id\":\"INT\",\"team_name\":\"VARCHAR(100)\"},\"Passes\":{\"pass_from\":\"INT\",\"time_stamp\":\"VARCHAR(5)\",\"pass_to\":\"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"CREATE TABLE If not exists Teams (\n player_id INT,\n team_name VARCHAR(100)\n)\n\n",
|
||||
"CREATE TABLE if not exists Passes (\n pass_from INT,\n time_stamp VARCHAR(5),\n pass_to INT\n)",
|
||||
"Truncate table Teams",
|
||||
"insert into Teams (player_id, team_name) values ('1', 'Arsenal')",
|
||||
"insert into Teams (player_id, team_name) values ('2', 'Arsenal')",
|
||||
"insert into Teams (player_id, team_name) values ('3', 'Arsenal')",
|
||||
"insert into Teams (player_id, team_name) values ('4', 'Arsenal')",
|
||||
"insert into Teams (player_id, team_name) values ('5', 'Chelsea')",
|
||||
"insert into Teams (player_id, team_name) values ('6', 'Chelsea')",
|
||||
"insert into Teams (player_id, team_name) values ('7', 'Chelsea')",
|
||||
"insert into Teams (player_id, team_name) values ('8', 'Chelsea')",
|
||||
"Truncate table Passes",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('1', '00:05', '2')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('2', '00:07', '3')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('3', '00:08', '4')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('4', '00:10', '5')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('6', '00:15', '7')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('7', '00:17', '8')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('8', '00:20', '6')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('6', '00:22', '5')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('1', '00:25', '2')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('2', '00:27', '3')"
|
||||
],
|
||||
"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\":{\"Teams\":[\"player_id\",\"team_name\"],\"Passes\":[\"pass_from\",\"time_stamp\",\"pass_to\"]},\"rows\":{\"Teams\":[[1,\"Arsenal\"],[2,\"Arsenal\"],[3,\"Arsenal\"],[4,\"Arsenal\"],[5,\"Chelsea\"],[6,\"Chelsea\"],[7,\"Chelsea\"],[8,\"Chelsea\"]],\"Passes\":[[1,\"00:05\",2],[2,\"00:07\",3],[3,\"00:08\",4],[4,\"00:10\",5],[6,\"00:15\",7],[7,\"00:17\",8],[8,\"00:20\",6],[6,\"00:22\",5],[1,\"00:25\",2],[2,\"00:27\",3]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
59
leetcode-cn/originData/[no content]maximum-sized-array.json
Normal file
59
leetcode-cn/originData/[no content]maximum-sized-array.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
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3564",
|
||||
"questionFrontendId": "3252",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2876919,
|
||||
"title": "Premier League Table Ranking II",
|
||||
"titleSlug": "premier-league-table-ranking-ii",
|
||||
"content": null,
|
||||
"translatedTitle": "英超积分榜排名 II",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"90\", \"totalSubmission\": \"146\", \"totalAcceptedRaw\": 90, \"totalSubmissionRaw\": 146, \"acRate\": \"61.6%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"TeamStats\": [\"team_id\", \"team_name\", \"matches_played\", \"wins\", \"draws\", \"losses\"]}, \"rows\": {\"TeamStats\": [[1, \"Chelsea\", 22, 13, 2, 7], [2, \"Nottingham Forest\", 27, 6, 6, 15], [3, \"Liverpool\", 17, 1, 8, 8], [4, \"Aston Villa\", 20, 1, 6, 13], [5, \"Fulham\", 31, 18, 1, 12], [6, \"Burnley\", 26, 6, 9, 11], [7, \"Newcastle United\", 33, 11, 10, 12], [8, \"Sheffield United\", 20, 18, 2, 0], [9, \"Luton Town\", 5, 4, 0, 1], [10, \"Everton\", 14, 2, 6, 6]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table if not exists TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)\"],\"mssql\":[\"Create table TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)\"],\"oraclesql\":[\"Create table TeamStats( team_id NUMBER, team_name varchar2(100),matches_played NUMBER, wins NUMBER,draws NUMBER,losses NUMBER)\"],\"postgresql\":[\"CREATE TABLE IF NOT EXISTS TeamStats (\\n team_id INT,\\n team_name VARCHAR(100),\\n matches_played INT,\\n wins INT,\\n draws INT,\\n losses INT\\n);\\n\"],\"pythondata\":[\"TeamStats = pd.DataFrame(data, columns=[\\\"team_id\\\", \\\"team_name\\\", \\\"matches_played\\\", \\\"wins\\\", \\\"draws\\\", \\\"losses\\\"]).astype({\\\"team_id\\\": \\\"int\\\", \\\"team_name\\\": \\\"string\\\", \\\"matches_played\\\": \\\"int\\\", \\\"wins\\\": \\\"int\\\", \\\"draws\\\": \\\"int\\\", \\\"losses\\\": \\\"int\\\"})\\n\"],\"database\":true,\"name\":\"calculate_team_tiers\",\"database_schema\":{\"TeamStats\":{\"team_id\":\"INT\",\"team_name\":\"VARCHAR(100)\",\"matches_played\":\"INT\",\"wins\":\"INT\",\"draws\":\"INT\",\"losses\":\"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table if not exists TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)",
|
||||
"Truncate table TeamStats",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('1', 'Chelsea', '22', '13', '2', '7')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('2', 'Nottingham Forest', '27', '6', '6', '15')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('3', 'Liverpool', '17', '1', '8', '8')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('4', 'Aston Villa', '20', '1', '6', '13')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('5', 'Fulham', '31', '18', '1', '12')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('6', 'Burnley', '26', '6', '9', '11')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('7', 'Newcastle United', '33', '11', '10', '12')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('8', 'Sheffield United', '20', '18', '2', '0')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('9', 'Luton Town', '5', '4', '0', '1')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('10', 'Everton', '14', '2', '6', '6')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\": {\"TeamStats\": [\"team_id\", \"team_name\", \"matches_played\", \"wins\", \"draws\", \"losses\"]}, \"rows\": {\"TeamStats\": [[1, \"Chelsea\", 22, 13, 2, 7], [2, \"Nottingham Forest\", 27, 6, 6, 15], [3, \"Liverpool\", 17, 1, 8, 8], [4, \"Aston Villa\", 20, 1, 6, 13], [5, \"Fulham\", 31, 18, 1, 12], [6, \"Burnley\", 26, 6, 9, 11], [7, \"Newcastle United\", 33, 11, 10, 12], [8, \"Sheffield United\", 20, 18, 2, 0], [9, \"Luton Town\", 5, 4, 0, 1], [10, \"Everton\", 14, 2, 6, 6]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3642",
|
||||
"questionFrontendId": "3322",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2949746,
|
||||
"title": "Premier League Table Ranking III",
|
||||
"titleSlug": "premier-league-table-ranking-iii",
|
||||
"content": null,
|
||||
"translatedTitle": "英超积分榜排名 III",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"84\", \"totalSubmission\": \"104\", \"totalAcceptedRaw\": 84, \"totalSubmissionRaw\": 104, \"acRate\": \"80.8%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"SeasonStats\":[\"season_id\",\"team_id\",\"team_name\",\"matches_played\",\"wins\",\"draws\",\"losses\",\"goals_for\",\"goals_against\"]},\"rows\":{\"SeasonStats\":[[2021,1,\"Manchester City\",38,29,6,3,99,26],[2021,2,\"Liverpool\",38,28,8,2,94,26],[2021,3,\"Chelsea\",38,21,11,6,76,33],[2021,4,\"Tottenham\",38,22,5,11,69,40],[2021,5,\"Arsenal\",38,22,3,13,61,48],[2022,1,\"Manchester City\",38,28,5,5,94,33],[2022,2,\"Arsenal\",38,26,6,6,88,43],[2022,3,\"Manchester United\",38,23,6,9,58,43],[2022,4,\"Newcastle\",38,19,14,5,68,33],[2022,5,\"Liverpool\",38,19,10,9,75,47]]}}",
|
||||
"metaData": "{\"mysql\":[\"CREATE TABLE SeasonStats (\\n season_id INT,\\n team_id INT,\\n team_name VARCHAR(255),\\n matches_played INT,\\n wins INT,\\n draws INT,\\n losses INT,\\n goals_for INT,\\n goals_against INT\\n)\"],\"mssql\":[\"CREATE TABLE SeasonStats (\\n season_id INT,\\n team_id INT,\\n team_name NVARCHAR(255),\\n matches_played INT,\\n wins INT,\\n draws INT,\\n losses INT,\\n goals_for INT,\\n goals_against INT\\n)\"],\"oraclesql\":[\"CREATE TABLE SeasonStats (\\n season_id NUMBER,\\n team_id NUMBER,\\n team_name VARCHAR2(255),\\n matches_played NUMBER,\\n wins NUMBER,\\n draws NUMBER,\\n losses NUMBER,\\n goals_for NUMBER,\\n goals_against NUMBER\\n)\"],\"database\":true,\"name\":\"process_team_standings\",\"postgresql\":[\"CREATE TABLE SeasonStats (\\n season_id INTEGER,\\n team_id INTEGER,\\n team_name VARCHAR(255),\\n matches_played INTEGER,\\n wins INTEGER,\\n draws INTEGER,\\n losses INTEGER,\\n goals_for INTEGER,\\n goals_against INTEGER\\n);\\n\"],\"pythondata\":[\"SeasonStats = pd.DataFrame(columns=['season_id', 'team_id', 'team_name', 'matches_played', 'wins', 'draws', 'losses', 'goals_for', 'goals_against'], dtype='int')\\n\"],\"database_schema\":{\"SeasonStats\":{\"season_id\":\"INT\",\"team_id\":\"INT\",\"team_name\":\"VARCHAR(255)\",\"matches_played\":\"INT\",\"wins\":\"INT\",\"draws\":\"INT\",\"losses\":\"INT\",\"goals_for\":\"INT\",\"goals_against\":\"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"CREATE TABLE SeasonStats (\n season_id INT,\n team_id INT,\n team_name VARCHAR(255),\n matches_played INT,\n wins INT,\n draws INT,\n losses INT,\n goals_for INT,\n goals_against INT\n)",
|
||||
"Truncate table SeasonStats",
|
||||
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2021', '1', 'Manchester City', '38', '29', '6', '3', '99', '26')",
|
||||
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2021', '2', 'Liverpool', '38', '28', '8', '2', '94', '26')",
|
||||
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2021', '3', 'Chelsea', '38', '21', '11', '6', '76', '33')",
|
||||
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2021', '4', 'Tottenham', '38', '22', '5', '11', '69', '40')",
|
||||
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2021', '5', 'Arsenal', '38', '22', '3', '13', '61', '48')",
|
||||
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2022', '1', 'Manchester City', '38', '28', '5', '5', '94', '33')",
|
||||
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2022', '2', 'Arsenal', '38', '26', '6', '6', '88', '43')",
|
||||
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2022', '3', 'Manchester United', '38', '23', '6', '9', '58', '43')",
|
||||
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2022', '4', 'Newcastle', '38', '19', '14', '5', '68', '33')",
|
||||
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2022', '5', 'Liverpool', '38', '19', '10', '9', '75', '47')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"SeasonStats\":[\"season_id\",\"team_id\",\"team_name\",\"matches_played\",\"wins\",\"draws\",\"losses\",\"goals_for\",\"goals_against\"]},\"rows\":{\"SeasonStats\":[[2021,1,\"Manchester City\",38,29,6,3,99,26],[2021,2,\"Liverpool\",38,28,8,2,94,26],[2021,3,\"Chelsea\",38,21,11,6,76,33],[2021,4,\"Tottenham\",38,22,5,11,69,40],[2021,5,\"Arsenal\",38,22,3,13,61,48],[2022,1,\"Manchester City\",38,28,5,5,94,33],[2022,2,\"Arsenal\",38,26,6,6,88,43],[2022,3,\"Manchester United\",38,23,6,9,58,43],[2022,4,\"Newcastle\",38,19,14,5,68,33],[2022,5,\"Liverpool\",38,19,10,9,75,47]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3554",
|
||||
"questionFrontendId": "3246",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2869459,
|
||||
"title": "Premier League Table Ranking",
|
||||
"titleSlug": "premier-league-table-ranking",
|
||||
"content": null,
|
||||
"translatedTitle": "英超积分榜排名",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Easy",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"32\", \"totalSubmission\": \"35\", \"totalAcceptedRaw\": 32, \"totalSubmissionRaw\": 35, \"acRate\": \"91.4%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"TeamStats\":[\"team_id\",\"team_name\",\"matches_played\",\"wins\",\"draws\",\"losses\"]},\"rows\":{\"TeamStats\":[[1,\"Manchester City\",10,6,2,2],[2,\"Liverpool\",10,6,2,2],[3,\"Chelsea\",10,5,3,2],[4,\"Arsenal\",10,4,4,2],[5,\"Tottenham\",10,3,5,2]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table if not exists TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)\"],\"mssql\":[\"Create table TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)\"],\"oraclesql\":[\"Create table TeamStats( team_id NUMBER, team_name varchar2(100),matches_played NUMBER, wins NUMBER,draws NUMBER,losses NUMBER)\"],\"database\":true,\"name\":\"calculate_team_standings\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS TeamStats (\\n team_id INT,\\n team_name VARCHAR(100),\\n matches_played INT,\\n wins INT,\\n draws INT,\\n losses INT\\n);\\n\"],\"pythondata\":[\"TeamStats = pd.DataFrame(data, columns=[\\\"team_id\\\", \\\"team_name\\\", \\\"matches_played\\\", \\\"wins\\\", \\\"draws\\\", \\\"losses\\\"]).astype({\\\"team_id\\\": \\\"int\\\", \\\"team_name\\\": \\\"string\\\", \\\"matches_played\\\": \\\"int\\\", \\\"wins\\\": \\\"int\\\", \\\"draws\\\": \\\"int\\\", \\\"losses\\\": \\\"int\\\"})\\n\"],\"database_schema\":{\"TeamStats\":{\"team_id\":\"INT\",\"team_name\":\"VARCHAR(100)\",\"matches_played\":\"INT\",\"wins\":\"INT\",\"draws\":\"INT\",\"losses\":\"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table if not exists TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)",
|
||||
"Truncate table TeamStats",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('1', 'Manchester City', '10', '6', '2', '2')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('2', 'Liverpool', '10', '6', '2', '2')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('3', 'Chelsea', '10', '5', '3', '2')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('4', 'Arsenal', '10', '4', '4', '2')",
|
||||
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('5', 'Tottenham', '10', '3', '5', '2')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"TeamStats\":[\"team_id\",\"team_name\",\"matches_played\",\"wins\",\"draws\",\"losses\"]},\"rows\":{\"TeamStats\":[[1,\"Manchester City\",10,6,2,2],[2,\"Liverpool\",10,6,2,2],[3,\"Chelsea\",10,5,3,2],[4,\"Arsenal\",10,4,4,2],[5,\"Tottenham\",10,3,5,2]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3660",
|
||||
"questionFrontendId": "3338",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 2968919,
|
||||
"title": "Second Highest Salary II",
|
||||
"titleSlug": "second-highest-salary-ii",
|
||||
"content": null,
|
||||
"translatedTitle": "第二高的薪水 II",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"60\", \"totalSubmission\": \"65\", \"totalAcceptedRaw\": 60, \"totalSubmissionRaw\": 65, \"acRate\": \"92.3%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"employees\":[\"emp_id\",\"salary\",\"dept\"]},\"rows\":{\"employees\":[[1,70000,\"Sales\"],[2,80000,\"Sales\"],[3,80000,\"Sales\"],[4,90000,\"Sales\"],[5,55000,\"IT\"],[6,65000,\"IT\"],[7,65000,\"IT\"],[8,50000,\"Marketing\"],[9,55000,\"Marketing\"],[10,55000,\"HR\"]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table if not exists Employees (\\n emp_id int,\\n salary int,\\n dept varchar(50)\\n)\"],\"mssql\":[\"Create table Employees (\\n emp_id int,\\n salary int,\\n dept varchar(50)\\n)\"],\"oraclesql\":[\"Create table Employees (\\n emp_id number,\\n salary number,\\n dept varchar2(50)\\n)\"],\"database\":true,\"name\":\"find_second_highest_salary\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Employees (\\n emp_id INT,\\n salary INT,\\n dept VARCHAR(50)\\n);\\n\"],\"pythondata\":[\"employees = pd.DataFrame({\\n 'emp_id': pd.Series(dtype='int'),\\n 'salary': pd.Series(dtype='int'),\\n 'dept': pd.Series(dtype='string')\\n})\"],\"database_schema\":{\"Employees\":{\"emp_id\":\"INT\",\"salary\":\"INT\",\"dept\":\"VARCHAR(50)\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table if not exists Employees (\n emp_id int,\n salary int,\n dept varchar(50)\n)",
|
||||
"Truncate table employees",
|
||||
"insert into employees (emp_id, salary, dept) values ('1', '70000', 'Sales')",
|
||||
"insert into employees (emp_id, salary, dept) values ('2', '80000', 'Sales')",
|
||||
"insert into employees (emp_id, salary, dept) values ('3', '80000', 'Sales')",
|
||||
"insert into employees (emp_id, salary, dept) values ('4', '90000', 'Sales')",
|
||||
"insert into employees (emp_id, salary, dept) values ('5', '55000', 'IT')",
|
||||
"insert into employees (emp_id, salary, dept) values ('6', '65000', 'IT')",
|
||||
"insert into employees (emp_id, salary, dept) values ('7', '65000', 'IT')",
|
||||
"insert into employees (emp_id, salary, dept) values ('8', '50000', 'Marketing')",
|
||||
"insert into employees (emp_id, salary, dept) values ('9', '55000', 'Marketing')",
|
||||
"insert into employees (emp_id, salary, dept) values ('10', '55000', 'HR')"
|
||||
],
|
||||
"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.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"employees\":[\"emp_id\",\"salary\",\"dept\"]},\"rows\":{\"employees\":[[1,70000,\"Sales\"],[2,80000,\"Sales\"],[3,80000,\"Sales\"],[4,90000,\"Sales\"],[5,55000,\"IT\"],[6,65000,\"IT\"],[7,65000,\"IT\"],[8,50000,\"Marketing\"],[9,55000,\"Marketing\"],[10,55000,\"HR\"]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "3719",
|
||||
"questionFrontendId": "3384",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 3014613,
|
||||
"title": "Team Dominance by Pass Success",
|
||||
"titleSlug": "team-dominance-by-pass-success",
|
||||
"content": null,
|
||||
"translatedTitle": "球队传球成功的优势得分",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"44\", \"totalSubmission\": \"52\", \"totalAcceptedRaw\": 44, \"totalSubmissionRaw\": 52, \"acRate\": \"84.6%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Teams\":[\"player_id\",\"team_name\"],\"Passes\":[\"pass_from\",\"time_stamp\",\"pass_to\"]},\"rows\":{\"Teams\":[[1,\"Arsenal\"],[2,\"Arsenal\"],[3,\"Arsenal\"],[4,\"Chelsea\"],[5,\"Chelsea\"],[6,\"Chelsea\"]],\"Passes\":[[1,\"00:15\",2],[2,\"00:45\",3],[3,\"01:15\",1],[4,\"00:30\",1],[2,\"46:00\",3],[3,\"46:15\",4],[1,\"46:45\",2],[5,\"46:30\",6]]}}",
|
||||
"metaData": "{\"mysql\":[\"CREATE TABLE If not exists Teams (\\n player_id INT,\\n team_name VARCHAR(100)\\n)\\n\\n\",\"CREATE TABLE if not exists Passes (\\n pass_from INT,\\n time_stamp VARCHAR(5),\\n pass_to INT\\n)\"],\"mssql\":[\"CREATE TABLE Teams (\\n player_id INT,\\n team_name VARCHAR(100)\\n)\\n\",\"\\nCREATE TABLE Passes (\\n pass_from INT,\\n time_stamp VARCHAR(5),\\n pass_to INT\\n)\"],\"oraclesql\":[\"CREATE TABLE Teams (\\n player_id NUMBER,\\n team_name VARCHAR2(100)\\n)\\n\\n\",\"CREATE TABLE Passes (\\n pass_from NUMBER,\\n time_stamp VARCHAR2(5),\\n pass_to NUMBER\\n)\"],\"database\":true,\"name\":\"calculate_team_dominance\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Teams (\\n player_id INTEGER,\\n team_name VARCHAR(100)\\n);\\n\",\"CREATE TABLE IF NOT EXISTS Passes (\\n pass_from INTEGER,\\n time_stamp VARCHAR(5),\\n pass_to INTEGER\\n);\\n\"],\"pythondata\":[\"Teams = pd.DataFrame(columns=[\\\"player_id\\\", \\\"team_name\\\"]).astype({\\\"player_id\\\": \\\"int\\\", \\\"team_name\\\": \\\"string\\\"})\\n\",\"Passes = pd.DataFrame(columns=[\\\"pass_from\\\", \\\"time_stamp\\\", \\\"pass_to\\\"]).astype({\\\"pass_from\\\": \\\"int\\\", \\\"time_stamp\\\": \\\"string\\\", \\\"pass_to\\\": \\\"int\\\"})\\n\"],\"database_schema\":{\"Teams\":{\"player_id\":\"INT\",\"team_name\":\"VARCHAR(100)\"},\"Passes\":{\"pass_from\":\"INT\",\"time_stamp\":\"VARCHAR(5)\",\"pass_to\":\"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"CREATE TABLE If not exists Teams (\n player_id INT,\n team_name VARCHAR(100)\n)\n\n",
|
||||
"CREATE TABLE if not exists Passes (\n pass_from INT,\n time_stamp VARCHAR(5),\n pass_to INT\n)",
|
||||
"Truncate table Teams",
|
||||
"insert into Teams (player_id, team_name) values ('1', 'Arsenal')",
|
||||
"insert into Teams (player_id, team_name) values ('2', 'Arsenal')",
|
||||
"insert into Teams (player_id, team_name) values ('3', 'Arsenal')",
|
||||
"insert into Teams (player_id, team_name) values ('4', 'Chelsea')",
|
||||
"insert into Teams (player_id, team_name) values ('5', 'Chelsea')",
|
||||
"insert into Teams (player_id, team_name) values ('6', 'Chelsea')",
|
||||
"Truncate table Passes",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('1', '00:15', '2')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('2', '00:45', '3')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('3', '01:15', '1')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('4', '00:30', '1')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('2', '46:00', '3')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('3', '46:15', '4')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('1', '46:45', '2')",
|
||||
"insert into Passes (pass_from, time_stamp, pass_to) values ('5', '46:30', '6')"
|
||||
],
|
||||
"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\":{\"Teams\":[\"player_id\",\"team_name\"],\"Passes\":[\"pass_from\",\"time_stamp\",\"pass_to\"]},\"rows\":{\"Teams\":[[1,\"Arsenal\"],[2,\"Arsenal\"],[3,\"Arsenal\"],[4,\"Chelsea\"],[5,\"Chelsea\"],[6,\"Chelsea\"]],\"Passes\":[[1,\"00:15\",2],[2,\"00:45\",3],[3,\"01:15\",1],[4,\"00:30\",1],[2,\"46:00\",3],[3,\"46:15\",4],[1,\"46:45\",2],[5,\"46:30\",6]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
178
leetcode-cn/originData/alternating-groups-iii.json
Normal file
178
leetcode-cn/originData/alternating-groups-iii.json
Normal file
File diff suppressed because one or more lines are too long
174
leetcode-cn/originData/button-with-longest-push-time.json
Normal file
174
leetcode-cn/originData/button-with-longest-push-time.json
Normal file
File diff suppressed because one or more lines are too long
168
leetcode-cn/originData/check-balanced-string.json
Normal file
168
leetcode-cn/originData/check-balanced-string.json
Normal file
File diff suppressed because one or more lines are too long
202
leetcode-cn/originData/check-if-dfs-strings-are-palindromes.json
Normal file
202
leetcode-cn/originData/check-if-dfs-strings-are-palindromes.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
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
180
leetcode-cn/originData/convert-date-to-binary.json
Normal file
180
leetcode-cn/originData/convert-date-to-binary.json
Normal file
File diff suppressed because one or more lines are too long
164
leetcode-cn/originData/count-almost-equal-pairs-i.json
Normal file
164
leetcode-cn/originData/count-almost-equal-pairs-i.json
Normal file
File diff suppressed because one or more lines are too long
164
leetcode-cn/originData/count-almost-equal-pairs-ii.json
Normal file
164
leetcode-cn/originData/count-almost-equal-pairs-ii.json
Normal file
File diff suppressed because one or more lines are too long
182
leetcode-cn/originData/count-beautiful-splits-in-an-array.json
Normal file
182
leetcode-cn/originData/count-beautiful-splits-in-an-array.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
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
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
176
leetcode-cn/originData/count-the-number-of-good-nodes.json
Normal file
176
leetcode-cn/originData/count-the-number-of-good-nodes.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
195
leetcode-cn/originData/design-neighbor-sum-service.json
Normal file
195
leetcode-cn/originData/design-neighbor-sum-service.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
File diff suppressed because one or more lines are too long
200
leetcode-cn/originData/find-a-safe-walk-through-a-grid.json
Normal file
200
leetcode-cn/originData/find-a-safe-walk-through-a-grid.json
Normal file
File diff suppressed because one or more lines are too long
176
leetcode-cn/originData/find-if-digit-game-can-be-won.json
Normal file
176
leetcode-cn/originData/find-if-digit-game-can-be-won.json
Normal file
File diff suppressed because one or more lines are too long
168
leetcode-cn/originData/find-indices-of-stable-mountains.json
Normal file
168
leetcode-cn/originData/find-indices-of-stable-mountains.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
File diff suppressed because one or more lines are too long
195
leetcode-cn/originData/find-subtree-sizes-after-changes.json
Normal file
195
leetcode-cn/originData/find-subtree-sizes-after-changes.json
Normal file
File diff suppressed because one or more lines are too long
195
leetcode-cn/originData/find-the-count-of-good-integers.json
Normal file
195
leetcode-cn/originData/find-the-count-of-good-integers.json
Normal file
File diff suppressed because one or more lines are too long
196
leetcode-cn/originData/find-the-count-of-monotonic-pairs-i.json
Normal file
196
leetcode-cn/originData/find-the-count-of-monotonic-pairs-i.json
Normal file
File diff suppressed because one or more lines are too long
192
leetcode-cn/originData/find-the-count-of-monotonic-pairs-ii.json
Normal file
192
leetcode-cn/originData/find-the-count-of-monotonic-pairs-ii.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
File diff suppressed because one or more lines are too long
174
leetcode-cn/originData/find-the-key-of-the-numbers.json
Normal file
174
leetcode-cn/originData/find-the-key-of-the-numbers.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
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
183
leetcode-cn/originData/find-the-number-of-winning-players.json
Normal file
183
leetcode-cn/originData/find-the-number-of-winning-players.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
170
leetcode-cn/originData/find-the-original-typed-string-i.json
Normal file
170
leetcode-cn/originData/find-the-original-typed-string-i.json
Normal file
File diff suppressed because one or more lines are too long
182
leetcode-cn/originData/find-the-original-typed-string-ii.json
Normal file
182
leetcode-cn/originData/find-the-original-typed-string-ii.json
Normal file
File diff suppressed because one or more lines are too long
176
leetcode-cn/originData/find-the-power-of-k-size-subarrays-i.json
Normal file
176
leetcode-cn/originData/find-the-power-of-k-size-subarrays-i.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
184
leetcode-cn/originData/find-the-winning-player-in-coin-game.json
Normal file
184
leetcode-cn/originData/find-the-winning-player-in-coin-game.json
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user