Skip to content

Commit c554fc6

Browse files
committed
add leetcode problem-cn part1
1 parent 8e54204 commit c554fc6

File tree

1,285 files changed

+108123
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,285 files changed

+108123
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"data": {
3+
"question": {
4+
"questionId": "1225",
5+
"questionFrontendId": "1126",
6+
"categoryTitle": "Database",
7+
"boundTopicId": 33222,
8+
"title": "Active Businesses",
9+
"titleSlug": "active-businesses",
10+
"content": null,
11+
"translatedTitle": "查询活跃业务",
12+
"translatedContent": null,
13+
"isPaidOnly": true,
14+
"difficulty": "Medium",
15+
"likes": 43,
16+
"dislikes": 0,
17+
"isLiked": null,
18+
"similarQuestions": "[]",
19+
"contributors": [],
20+
"langToValidPlayground": null,
21+
"topicTags": [
22+
{
23+
"name": "Database",
24+
"slug": "database",
25+
"translatedName": "数据库",
26+
"__typename": "TopicTagNode"
27+
}
28+
],
29+
"companyTagStats": null,
30+
"codeSnippets": null,
31+
"stats": "{\"totalAccepted\": \"8K\", \"totalSubmission\": \"11.6K\", \"totalAcceptedRaw\": 7955, \"totalSubmissionRaw\": 11588, \"acRate\": \"68.6%\"}",
32+
"hints": [],
33+
"solution": null,
34+
"status": null,
35+
"sampleTestCase": "{\"headers\":{\"Events\":[\"business_id\",\"event_type\",\"occurences\"]},\"rows\":{\"Events\":[[1,\"reviews\",7],[3,\"reviews\",3],[1,\"ads\",11],[2,\"ads\",7],[3,\"ads\",6],[1,\"page views\",3],[2,\"page views\",12]]}}",
36+
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Events (business_id int, event_type varchar(10), occurences int)\"\n ],\n \"mssql\": [\n \"Create table Events (business_id int, event_type varchar(10), occurences int)\"\n ],\n \"oraclesql\": [\n \"Create table Events (business_id int, event_type varchar(10), occurences int)\"\n ],\n \"database\": true\n}",
37+
"judgerAvailable": true,
38+
"judgeType": "large",
39+
"mysqlSchemas": [
40+
"Create table If Not Exists Events (business_id int, event_type varchar(10), occurences int)",
41+
"Truncate table Events",
42+
"insert into Events (business_id, event_type, occurences) values ('1', 'reviews', '7')",
43+
"insert into Events (business_id, event_type, occurences) values ('3', 'reviews', '3')",
44+
"insert into Events (business_id, event_type, occurences) values ('1', 'ads', '11')",
45+
"insert into Events (business_id, event_type, occurences) values ('2', 'ads', '7')",
46+
"insert into Events (business_id, event_type, occurences) values ('3', 'ads', '6')",
47+
"insert into Events (business_id, event_type, occurences) values ('1', 'page views', '3')",
48+
"insert into Events (business_id, event_type, occurences) values ('2', 'page views', '12')"
49+
],
50+
"enableRunCode": true,
51+
"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>\"]}",
52+
"book": null,
53+
"isSubscribed": false,
54+
"isDailyQuestion": false,
55+
"dailyRecordStatus": null,
56+
"editorType": "CKEDITOR",
57+
"ugcQuestionId": null,
58+
"style": "LEETCODE",
59+
"exampleTestcases": "{\"headers\":{\"Events\":[\"business_id\",\"event_type\",\"occurences\"]},\"rows\":{\"Events\":[[1,\"reviews\",7],[3,\"reviews\",3],[1,\"ads\",11],[2,\"ads\",7],[3,\"ads\",6],[1,\"page views\",3],[2,\"page views\",12]]}}",
60+
"__typename": "QuestionNode"
61+
}
62+
}
63+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"data": {
3+
"question": {
4+
"questionId": "1579",
5+
"questionFrontendId": "1454",
6+
"categoryTitle": "Database",
7+
"boundTopicId": 258463,
8+
"title": "Active Users",
9+
"titleSlug": "active-users",
10+
"content": null,
11+
"translatedTitle": "活跃用户",
12+
"translatedContent": null,
13+
"isPaidOnly": true,
14+
"difficulty": "Medium",
15+
"likes": 51,
16+
"dislikes": 0,
17+
"isLiked": null,
18+
"similarQuestions": "[]",
19+
"contributors": [],
20+
"langToValidPlayground": null,
21+
"topicTags": [
22+
{
23+
"name": "Database",
24+
"slug": "database",
25+
"translatedName": "数据库",
26+
"__typename": "TopicTagNode"
27+
}
28+
],
29+
"companyTagStats": null,
30+
"codeSnippets": null,
31+
"stats": "{\"totalAccepted\": \"6.5K\", \"totalSubmission\": \"16.3K\", \"totalAcceptedRaw\": 6452, \"totalSubmissionRaw\": 16313, \"acRate\": \"39.6%\"}",
32+
"hints": [],
33+
"solution": null,
34+
"status": null,
35+
"sampleTestCase": "{\"headers\":{\"Accounts\":[\"id\",\"name\"],\"Logins\":[\"id\",\"login_date\"]},\"rows\":{\"Accounts\":[[1,\"Winston\"],[7,\"Jonathan\"]],\"Logins\":[[7,\"2020-05-30\"],[1,\"2020-05-30\"],[7,\"2020-05-31\"],[7,\"2020-06-01\"],[7,\"2020-06-02\"],[7,\"2020-06-02\"],[7,\"2020-06-03\"],[1,\"2020-06-07\"],[7,\"2020-06-10\"]]}}",
36+
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Accounts (id int, name varchar(10))\",\n \"Create table If Not Exists Logins (id int, login_date date)\"\n ],\n \"mssql\": [\n \"Create table Accounts (id int, name varchar(10))\",\n \"Create table Logins (id int, login_date date)\"\n ],\n \"oraclesql\": [\n \"Create table Accounts (id int, name varchar(10))\",\n \"Create table Logins (id int, login_date date)\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}",
37+
"judgerAvailable": true,
38+
"judgeType": "large",
39+
"mysqlSchemas": [
40+
"Create table If Not Exists Accounts (id int, name varchar(10))",
41+
"Create table If Not Exists Logins (id int, login_date date)",
42+
"Truncate table Accounts",
43+
"insert into Accounts (id, name) values ('1', 'Winston')",
44+
"insert into Accounts (id, name) values ('7', 'Jonathan')",
45+
"Truncate table Logins",
46+
"insert into Logins (id, login_date) values ('7', '2020-05-30')",
47+
"insert into Logins (id, login_date) values ('1', '2020-05-30')",
48+
"insert into Logins (id, login_date) values ('7', '2020-05-31')",
49+
"insert into Logins (id, login_date) values ('7', '2020-06-01')",
50+
"insert into Logins (id, login_date) values ('7', '2020-06-02')",
51+
"insert into Logins (id, login_date) values ('7', '2020-06-02')",
52+
"insert into Logins (id, login_date) values ('7', '2020-06-03')",
53+
"insert into Logins (id, login_date) values ('1', '2020-06-07')",
54+
"insert into Logins (id, login_date) values ('7', '2020-06-10')"
55+
],
56+
"enableRunCode": true,
57+
"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>\"]}",
58+
"book": null,
59+
"isSubscribed": false,
60+
"isDailyQuestion": false,
61+
"dailyRecordStatus": null,
62+
"editorType": "CKEDITOR",
63+
"ugcQuestionId": null,
64+
"style": "LEETCODE",
65+
"exampleTestcases": "{\"headers\":{\"Accounts\":[\"id\",\"name\"],\"Logins\":[\"id\",\"login_date\"]},\"rows\":{\"Accounts\":[[1,\"Winston\"],[7,\"Jonathan\"]],\"Logins\":[[7,\"2020-05-30\"],[1,\"2020-05-30\"],[7,\"2020-05-31\"],[7,\"2020-06-01\"],[7,\"2020-06-02\"],[7,\"2020-06-02\"],[7,\"2020-06-03\"],[1,\"2020-06-07\"],[7,\"2020-06-10\"]]}}",
66+
"__typename": "QuestionNode"
67+
}
68+
}
69+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"data": {
3+
"question": {
4+
"questionId": "1494",
5+
"questionFrontendId": "1355",
6+
"categoryTitle": "Database",
7+
"boundTopicId": 105475,
8+
"title": "Activity Participants",
9+
"titleSlug": "activity-participants",
10+
"content": null,
11+
"translatedTitle": "活动参与者",
12+
"translatedContent": null,
13+
"isPaidOnly": true,
14+
"difficulty": "Medium",
15+
"likes": 24,
16+
"dislikes": 0,
17+
"isLiked": null,
18+
"similarQuestions": "[]",
19+
"contributors": [],
20+
"langToValidPlayground": null,
21+
"topicTags": [
22+
{
23+
"name": "Database",
24+
"slug": "database",
25+
"translatedName": "数据库",
26+
"__typename": "TopicTagNode"
27+
}
28+
],
29+
"companyTagStats": null,
30+
"codeSnippets": null,
31+
"stats": "{\"totalAccepted\": \"5K\", \"totalSubmission\": \"7.5K\", \"totalAcceptedRaw\": 5015, \"totalSubmissionRaw\": 7512, \"acRate\": \"66.8%\"}",
32+
"hints": [],
33+
"solution": null,
34+
"status": null,
35+
"sampleTestCase": "{\"headers\": {\"Friends\": [\"id\", \"name\", \"activity\"], \"Activities\": [\"id\", \"name\"]}, \"rows\": {\"Friends\": [[1, \"Jonathan D.\", \"Eating\"], [2, \"Jade W.\", \"Singing\"], [3, \"Victor J.\", \"Singing\"], [4, \"Elvis Q.\", \"Eating\"], [5, \"Daniel A.\", \"Eating\"], [6, \"Bob B.\", \"Horse Riding\"]], \"Activities\": [[1, \"Eating\"], [2, \"Singing\"], [3, \"Horse Riding\"]]}}",
36+
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Friends (id int, name varchar(30), activity varchar(30))\",\n \"Create table If Not Exists Activities (id int, name varchar(30))\"\n ],\n \"mssql\": [\n \"Create table Friends (id int, name varchar(30), activity varchar(30))\",\n \"Create table Activities (id int, name varchar(30))\"\n ],\n \"oraclesql\": [\n \"Create table Friends (id int, name varchar(30), activity varchar(30))\",\n \"Create table Activities (id int, name varchar(30))\"\n ],\n \"database\": true\n}",
37+
"judgerAvailable": true,
38+
"judgeType": "large",
39+
"mysqlSchemas": [
40+
"Create table If Not Exists Friends (id int, name varchar(30), activity varchar(30))",
41+
"Create table If Not Exists Activities (id int, name varchar(30))",
42+
"Truncate table Friends",
43+
"insert into Friends (id, name, activity) values ('1', 'Jonathan D.', 'Eating')",
44+
"insert into Friends (id, name, activity) values ('2', 'Jade W.', 'Singing')",
45+
"insert into Friends (id, name, activity) values ('3', 'Victor J.', 'Singing')",
46+
"insert into Friends (id, name, activity) values ('4', 'Elvis Q.', 'Eating')",
47+
"insert into Friends (id, name, activity) values ('5', 'Daniel A.', 'Eating')",
48+
"insert into Friends (id, name, activity) values ('6', 'Bob B.', 'Horse Riding')",
49+
"Truncate table Activities",
50+
"insert into Activities (id, name) values ('1', 'Eating')",
51+
"insert into Activities (id, name) values ('2', 'Singing')",
52+
"insert into Activities (id, name) values ('3', 'Horse Riding')"
53+
],
54+
"enableRunCode": true,
55+
"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>\"]}",
56+
"book": null,
57+
"isSubscribed": false,
58+
"isDailyQuestion": false,
59+
"dailyRecordStatus": null,
60+
"editorType": "CKEDITOR",
61+
"ugcQuestionId": null,
62+
"style": "LEETCODE",
63+
"exampleTestcases": "{\"headers\": {\"Friends\": [\"id\", \"name\", \"activity\"], \"Activities\": [\"id\", \"name\"]}, \"rows\": {\"Friends\": [[1, \"Jonathan D.\", \"Eating\"], [2, \"Jade W.\", \"Singing\"], [3, \"Victor J.\", \"Singing\"], [4, \"Elvis Q.\", \"Eating\"], [5, \"Daniel A.\", \"Eating\"], [6, \"Bob B.\", \"Horse Riding\"]], \"Activities\": [[1, \"Eating\"], [2, \"Singing\"], [3, \"Horse Riding\"]]}}",
64+
"__typename": "QuestionNode"
65+
}
66+
}
67+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"data": {
3+
"question": {
4+
"questionId": "1453",
5+
"questionFrontendId": "1322",
6+
"categoryTitle": "Database",
7+
"boundTopicId": 76185,
8+
"title": "Ads Performance",
9+
"titleSlug": "ads-performance",
10+
"content": null,
11+
"translatedTitle": "广告效果",
12+
"translatedContent": null,
13+
"isPaidOnly": true,
14+
"difficulty": "Easy",
15+
"likes": 33,
16+
"dislikes": 0,
17+
"isLiked": null,
18+
"similarQuestions": "[]",
19+
"contributors": [],
20+
"langToValidPlayground": null,
21+
"topicTags": [
22+
{
23+
"name": "Database",
24+
"slug": "database",
25+
"translatedName": "数据库",
26+
"__typename": "TopicTagNode"
27+
}
28+
],
29+
"companyTagStats": null,
30+
"codeSnippets": null,
31+
"stats": "{\"totalAccepted\": \"6.8K\", \"totalSubmission\": \"11.4K\", \"totalAcceptedRaw\": 6804, \"totalSubmissionRaw\": 11374, \"acRate\": \"59.8%\"}",
32+
"hints": [],
33+
"solution": null,
34+
"status": null,
35+
"sampleTestCase": "{\"headers\":{\"Ads\":[\"ad_id\",\"user_id\",\"action\"]},\"rows\":{\"Ads\":[[1,1,\"Clicked\"],[2,2,\"Clicked\"],[3,3,\"Viewed\"],[5,5,\"Ignored\"],[1,7,\"Ignored\"],[2,7,\"Viewed\"],[3,5,\"Clicked\"],[1,4,\"Viewed\"],[2,11,\"Viewed\"],[1,2,\"Clicked\"]]}}",
36+
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Ads (ad_id int, user_id int, action ENUM('Clicked', 'Viewed', 'Ignored'))\"\n ],\n \"mssql\": [\n \"create table Ads (ad_id int, user_id int, action VARCHAR(10) NOT NULL CHECK (action IN ('Clicked', 'Viewed', 'Ignored')))\"\n ],\n \"oraclesql\": [\n \"create table Ads (ad_id int, user_id int, action VARCHAR(10) NOT NULL CHECK (action IN ('Clicked', 'Viewed', 'Ignored')))\"\n ],\n \"database\": true\n}",
37+
"judgerAvailable": true,
38+
"judgeType": "large",
39+
"mysqlSchemas": [
40+
"Create table If Not Exists Ads (ad_id int, user_id int, action ENUM('Clicked', 'Viewed', 'Ignored'))",
41+
"Truncate table Ads",
42+
"insert into Ads (ad_id, user_id, action) values ('1', '1', 'Clicked')",
43+
"insert into Ads (ad_id, user_id, action) values ('2', '2', 'Clicked')",
44+
"insert into Ads (ad_id, user_id, action) values ('3', '3', 'Viewed')",
45+
"insert into Ads (ad_id, user_id, action) values ('5', '5', 'Ignored')",
46+
"insert into Ads (ad_id, user_id, action) values ('1', '7', 'Ignored')",
47+
"insert into Ads (ad_id, user_id, action) values ('2', '7', 'Viewed')",
48+
"insert into Ads (ad_id, user_id, action) values ('3', '5', 'Clicked')",
49+
"insert into Ads (ad_id, user_id, action) values ('1', '4', 'Viewed')",
50+
"insert into Ads (ad_id, user_id, action) values ('2', '11', 'Viewed')",
51+
"insert into Ads (ad_id, user_id, action) values ('1', '2', 'Clicked')"
52+
],
53+
"enableRunCode": true,
54+
"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>\"]}",
55+
"book": null,
56+
"isSubscribed": false,
57+
"isDailyQuestion": false,
58+
"dailyRecordStatus": null,
59+
"editorType": "CKEDITOR",
60+
"ugcQuestionId": null,
61+
"style": "LEETCODE",
62+
"exampleTestcases": "{\"headers\":{\"Ads\":[\"ad_id\",\"user_id\",\"action\"]},\"rows\":{\"Ads\":[[1,1,\"Clicked\"],[2,2,\"Clicked\"],[3,3,\"Viewed\"],[5,5,\"Ignored\"],[1,7,\"Ignored\"],[2,7,\"Viewed\"],[3,5,\"Clicked\"],[1,4,\"Viewed\"],[2,11,\"Viewed\"],[1,2,\"Clicked\"]]}}",
63+
"__typename": "QuestionNode"
64+
}
65+
}
66+
}

0 commit comments

Comments
 (0)