1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-03 06:22:54 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 12:55:24 +08:00
parent 2b0511d272
commit b84ae535b7
3973 changed files with 51044 additions and 105065 deletions

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

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,71 @@
{
"data": {
"question": {
"questionId": "2185",
"questionFrontendId": "2041",
"boundTopicId": null,
"title": "Accepted Candidates From the Interviews",
"titleSlug": "accepted-candidates-from-the-interviews",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 17,
"dislikes": 17,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Candidates\":[\"candidate_id\",\"name\",\"years_of_exp\",\"interview_id\"],\"Rounds\":[\"interview_id\",\"round_id\",\"score\"]},\"rows\":{\"Candidates\":[[11,\"Atticus\",1,101],[9,\"Ruben\",6,104],[6,\"Aliza\",10,109],[8,\"Alfredo\",0,107]],\"Rounds\":[[109,3,4],[101,2,8],[109,4,1],[107,1,3],[104,3,6],[109,1,4],[104,4,7],[104,1,2],[109,2,1],[104,2,7],[107,2,3],[101,1,8]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"2.7K\", \"totalSubmission\": \"3.5K\", \"totalAcceptedRaw\": 2700, \"totalSubmissionRaw\": 3503, \"acRate\": \"77.1%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Candidates\":[\"candidate_id\",\"name\",\"years_of_exp\",\"interview_id\"],\"Rounds\":[\"interview_id\",\"round_id\",\"score\"]},\"rows\":{\"Candidates\":[[11,\"Atticus\",1,101],[9,\"Ruben\",6,104],[6,\"Aliza\",10,109],[8,\"Alfredo\",0,107]],\"Rounds\":[[109,3,4],[101,2,8],[109,4,1],[107,1,3],[104,3,6],[109,1,4],[104,4,7],[104,1,2],[109,2,1],[104,2,7],[107,2,3],[101,1,8]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Candidates (candidate_id int, name varchar(30), years_of_exp int, interview_id int)\",\n \"Create table If Not Exists Rounds (interview_id int, round_id int, score int)\"\n ],\n \"mssql\": [\n \"Create table Candidates (candidate_id int, name varchar(30), years_of_exp int, interview_id int)\",\n \"Create table Rounds (interview_id int, round_id int, score int)\"\n ],\n \"oraclesql\": [\n \"Create table Candidates (candidate_id int, name varchar(30), years_of_exp int, interview_id int)\",\n \"Create table Rounds (interview_id int, round_id int, score int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Candidates (candidate_id int, name varchar(30), years_of_exp int, interview_id int)",
"Create table If Not Exists Rounds (interview_id int, round_id int, score int)",
"Truncate table Candidates",
"insert into Candidates (candidate_id, name, years_of_exp, interview_id) values ('11', 'Atticus', '1', '101')",
"insert into Candidates (candidate_id, name, years_of_exp, interview_id) values ('9', 'Ruben', '6', '104')",
"insert into Candidates (candidate_id, name, years_of_exp, interview_id) values ('6', 'Aliza', '10', '109')",
"insert into Candidates (candidate_id, name, years_of_exp, interview_id) values ('8', 'Alfredo', '0', '107')",
"Truncate table Rounds",
"insert into Rounds (interview_id, round_id, score) values ('109', '3', '4')",
"insert into Rounds (interview_id, round_id, score) values ('101', '2', '8')",
"insert into Rounds (interview_id, round_id, score) values ('109', '4', '1')",
"insert into Rounds (interview_id, round_id, score) values ('107', '1', '3')",
"insert into Rounds (interview_id, round_id, score) values ('104', '3', '6')",
"insert into Rounds (interview_id, round_id, score) values ('109', '1', '4')",
"insert into Rounds (interview_id, round_id, score) values ('104', '4', '7')",
"insert into Rounds (interview_id, round_id, score) values ('104', '1', '2')",
"insert into Rounds (interview_id, round_id, score) values ('109', '2', '1')",
"insert into Rounds (interview_id, round_id, score) values ('104', '2', '7')",
"insert into Rounds (interview_id, round_id, score) values ('107', '2', '3')",
"insert into Rounds (interview_id, round_id, score) values ('101', '1', '8')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,58 @@
{
"data": {
"question": {
"questionId": "2208",
"questionFrontendId": "2066",
"boundTopicId": null,
"title": "Account Balance",
"titleSlug": "account-balance",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 26,
"dislikes": 1,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Transactions\":[\"account_id\",\"day\",\"type\",\"amount\"]},\"rows\":{\"Transactions\":[[1,\"2021-11-07\",\"Deposit\",2000],[1,\"2021-11-09\",\"Withdraw\",1000],[1,\"2021-11-11\",\"Deposit\",3000],[2,\"2021-12-07\",\"Deposit\",7000],[2,\"2021-12-12\",\"Withdraw\",7000]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"2.7K\", \"totalSubmission\": \"3.2K\", \"totalAcceptedRaw\": 2695, \"totalSubmissionRaw\": 3170, \"acRate\": \"85.0%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Transactions\":[\"account_id\",\"day\",\"type\",\"amount\"]},\"rows\":{\"Transactions\":[[1,\"2021-11-07\",\"Deposit\",2000],[1,\"2021-11-09\",\"Withdraw\",1000],[1,\"2021-11-11\",\"Deposit\",3000],[2,\"2021-12-07\",\"Deposit\",7000],[2,\"2021-12-12\",\"Withdraw\",7000]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Transactions (account_id int, day date, type ENUM('Deposit', 'Withdraw'), amount int)\"\n ],\n \"mssql\": [\n \"Create table Transactions (account_id int, day date, type varchar(8) NOT NULL CHECK (type IN('Deposit', 'Withdraw')), amount int)\"\n ],\n \"oraclesql\": [\n \"Create table Transactions (account_id int, day date, type varchar(8) NOT NULL CHECK (type IN('Deposit', 'Withdraw')), amount int)\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Transactions (account_id int, day date, type ENUM('Deposit', 'Withdraw'), amount int)",
"Truncate table Transactions",
"insert into Transactions (account_id, day, type, amount) values ('1', '2021-11-07', 'Deposit', '2000')",
"insert into Transactions (account_id, day, type, amount) values ('1', '2021-11-09', 'Withdraw', '1000')",
"insert into Transactions (account_id, day, type, amount) values ('1', '2021-11-11', 'Deposit', '3000')",
"insert into Transactions (account_id, day, type, amount) values ('2', '2021-12-07', 'Deposit', '7000')",
"insert into Transactions (account_id, day, type, amount) values ('2', '2021-12-12', 'Withdraw', '7000')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,60 @@
{
"data": {
"question": {
"questionId": "1225",
"questionFrontendId": "1126",
"boundTopicId": null,
"title": "Active Businesses",
"titleSlug": "active-businesses",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 174,
"dislikes": 20,
"isLiked": null,
"similarQuestions": "[]",
"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]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"28.7K\", \"totalSubmission\": \"42.3K\", \"totalAcceptedRaw\": 28694, \"totalSubmissionRaw\": 42287, \"acRate\": \"67.9%\"}",
"hints": [],
"solution": null,
"status": null,
"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]]}}",
"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}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Events (business_id int, event_type varchar(10), occurences int)",
"Truncate table Events",
"insert into Events (business_id, event_type, occurences) values ('1', 'reviews', '7')",
"insert into Events (business_id, event_type, occurences) values ('3', 'reviews', '3')",
"insert into Events (business_id, event_type, occurences) values ('1', 'ads', '11')",
"insert into Events (business_id, event_type, occurences) values ('2', 'ads', '7')",
"insert into Events (business_id, event_type, occurences) values ('3', 'ads', '6')",
"insert into Events (business_id, event_type, occurences) values ('1', 'page views', '3')",
"insert into Events (business_id, event_type, occurences) values ('2', 'page views', '12')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,66 @@
{
"data": {
"question": {
"questionId": "1579",
"questionFrontendId": "1454",
"boundTopicId": null,
"title": "Active Users",
"titleSlug": "active-users",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 272,
"dislikes": 26,
"isLiked": null,
"similarQuestions": "[]",
"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\"]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"21.8K\", \"totalSubmission\": \"56.8K\", \"totalAcceptedRaw\": 21791, \"totalSubmissionRaw\": 56755, \"acRate\": \"38.4%\"}",
"hints": [],
"solution": null,
"status": null,
"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\"]]}}",
"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}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Accounts (id int, name varchar(10))",
"Create table If Not Exists Logins (id int, login_date date)",
"Truncate table Accounts",
"insert into Accounts (id, name) values ('1', 'Winston')",
"insert into Accounts (id, name) values ('7', 'Jonathan')",
"Truncate table Logins",
"insert into Logins (id, login_date) values ('7', '2020-05-30')",
"insert into Logins (id, login_date) values ('1', '2020-05-30')",
"insert into Logins (id, login_date) values ('7', '2020-05-31')",
"insert into Logins (id, login_date) values ('7', '2020-06-01')",
"insert into Logins (id, login_date) values ('7', '2020-06-02')",
"insert into Logins (id, login_date) values ('7', '2020-06-02')",
"insert into Logins (id, login_date) values ('7', '2020-06-03')",
"insert into Logins (id, login_date) values ('1', '2020-06-07')",
"insert into Logins (id, login_date) values ('7', '2020-06-10')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,64 @@
{
"data": {
"question": {
"questionId": "1494",
"questionFrontendId": "1355",
"boundTopicId": null,
"title": "Activity Participants",
"titleSlug": "activity-participants",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 93,
"dislikes": 34,
"isLiked": null,
"similarQuestions": "[]",
"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\"]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"20.1K\", \"totalSubmission\": \"26.9K\", \"totalAcceptedRaw\": 20069, \"totalSubmissionRaw\": 26929, \"acRate\": \"74.5%\"}",
"hints": [],
"solution": null,
"status": null,
"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\"]]}}",
"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}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Friends (id int, name varchar(30), activity varchar(30))",
"Create table If Not Exists Activities (id int, name varchar(30))",
"Truncate table Friends",
"insert into Friends (id, name, activity) values ('1', 'Jonathan D.', 'Eating')",
"insert into Friends (id, name, activity) values ('2', 'Jade W.', 'Singing')",
"insert into Friends (id, name, activity) values ('3', 'Victor J.', 'Singing')",
"insert into Friends (id, name, activity) values ('4', 'Elvis Q.', 'Eating')",
"insert into Friends (id, name, activity) values ('5', 'Daniel A.', 'Eating')",
"insert into Friends (id, name, activity) values ('6', 'Bob B.', 'Horse Riding')",
"Truncate table Activities",
"insert into Activities (id, name) values ('1', 'Eating')",
"insert into Activities (id, name) values ('2', 'Singing')",
"insert into Activities (id, name) values ('3', 'Horse Riding')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,63 @@
{
"data": {
"question": {
"questionId": "1958",
"questionFrontendId": "1809",
"boundTopicId": null,
"title": "Ad-Free Sessions",
"titleSlug": "ad-free-sessions",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 49,
"dislikes": 25,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Playback\":[\"session_id\",\"customer_id\",\"start_time\",\"end_time\"],\"Ads\":[\"ad_id\",\"customer_id\",\"timestamp\"]},\"rows\":{\"Playback\":[[1,1,1,5],[2,1,15,23],[3,2,10,12],[4,2,17,28],[5,2,2,8]],\"Ads\":[[1,1,5],[2,2,17],[3,2,20]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"8.3K\", \"totalSubmission\": \"13.9K\", \"totalAcceptedRaw\": 8299, \"totalSubmissionRaw\": 13851, \"acRate\": \"59.9%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Playback\":[\"session_id\",\"customer_id\",\"start_time\",\"end_time\"],\"Ads\":[\"ad_id\",\"customer_id\",\"timestamp\"]},\"rows\":{\"Playback\":[[1,1,1,5],[2,1,15,23],[3,2,10,12],[4,2,17,28],[5,2,2,8]],\"Ads\":[[1,1,5],[2,2,17],[3,2,20]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Playback(session_id int,customer_id int,start_time int,end_time int)\",\n \"Create table If Not Exists Ads (ad_id int, customer_id int, timestamp int)\"\n ],\n \"mssql\": [\n \"Create table Playback(session_id int,customer_id int,start_time int,end_time int)\",\n \"Create table Ads (ad_id int, customer_id int, timestamp int)\"\n ],\n \"oraclesql\": [\n \"Create table Playback(session_id int,customer_id int,start_time int,end_time int)\",\n \"Create table Ads (ad_id int, customer_id int, timestamp int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Playback(session_id int,customer_id int,start_time int,end_time int)",
"Create table If Not Exists Ads (ad_id int, customer_id int, timestamp int)",
"Truncate table Playback",
"insert into Playback (session_id, customer_id, start_time, end_time) values ('1', '1', '1', '5')",
"insert into Playback (session_id, customer_id, start_time, end_time) values ('2', '1', '15', '23')",
"insert into Playback (session_id, customer_id, start_time, end_time) values ('3', '2', '10', '12')",
"insert into Playback (session_id, customer_id, start_time, end_time) values ('4', '2', '17', '28')",
"insert into Playback (session_id, customer_id, start_time, end_time) values ('5', '2', '2', '8')",
"Truncate table Ads",
"insert into Ads (ad_id, customer_id, timestamp) values ('1', '1', '5')",
"insert into Ads (ad_id, customer_id, timestamp) values ('2', '2', '17')",
"insert into Ads (ad_id, customer_id, timestamp) values ('3', '2', '20')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,66 @@
{
"data": {
"question": {
"questionId": "1774",
"questionFrontendId": "1634",
"boundTopicId": null,
"title": "Add Two Polynomials Represented as Linked Lists",
"titleSlug": "add-two-polynomials-represented-as-linked-lists",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 79,
"dislikes": 5,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Add Two Numbers\", \"titleSlug\": \"add-two-numbers\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Merge Two Sorted Lists\", \"titleSlug\": \"merge-two-sorted-lists\", \"difficulty\": \"Easy\", \"translatedTitle\": null}, {\"title\": \"Add Two Numbers II\", \"titleSlug\": \"add-two-numbers-ii\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "[[1,1]]\n[[1,0]]\n[[2,2],[4,1],[3,0]]\n[[3,2],[-4,1],[-1,0]]\n[[1,2]]\n[[-1,2]]",
"categoryTitle": "Algorithms",
"contributors": [],
"topicTags": [
{
"name": "Linked List",
"slug": "linked-list",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Math",
"slug": "math",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Two Pointers",
"slug": "two-pointers",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"5K\", \"totalSubmission\": \"9.4K\", \"totalAcceptedRaw\": 5040, \"totalSubmissionRaw\": 9362, \"acRate\": \"53.8%\"}",
"hints": [
"Process both linked lists at the same time",
"If the current power of the two heads is equal, add this power with the sum of the coefficients to the answer list.",
"If one head has a larger power, add this power to the answer list and move only this head."
],
"solution": null,
"status": null,
"sampleTestCase": "[[1,1]]\n[[1,0]]",
"metaData": "{\n \"name\": \"addPoly\",\n \"params\": [\n {\n \"type\": \"integer[][]\",\n \"name\": \"poly1\"\n },\n {\n \"type\": \"integer[][]\",\n \"name\": \"poly2\"\n }\n ],\n \"return\": {\n \"type\": \"integer\"\n },\n \"manual\": true,\n \"languages\": [\n \"cpp\",\n \"java\",\n \"javascript\",\n \"python3\",\n \"python\",\n \"csharp\"\n ]\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": true,
"envInfo": "{\"cpp\": [\"C++\", \"<p>Compiled with <code> clang 11 </code> using the latest C++ 17 standard.</p>\\r\\n\\r\\n<p>Your code is compiled with level two optimization (<code>-O2</code>). <a href=\\\"https://github.com/google/sanitizers/wiki/AddressSanitizer\\\" target=\\\"_blank\\\">AddressSanitizer</a> is also enabled to help detect out-of-bounds and use-after-free bugs.</p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\"], \"java\": [\"Java\", \"<p><code> OpenJDK 17 </code>. Java 8 features such as lambda expressions and stream API can be used. </p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\\r\\n<p>Includes <code>Pair</code> class from https://docs.oracle.com/javase/8/javafx/api/javafx/util/Pair.html.</p>\"], \"python\": [\"Python\", \"<p><code>Python 2.7.12</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/2/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/2/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/2/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\\r\\n\\r\\n<p>Note that Python 2.7 <a href=\\\"https://www.python.org/dev/peps/pep-0373/\\\" target=\\\"_blank\\\">will not be maintained past 2020</a>. For the latest Python, please choose Python3 instead.</p>\"], \"csharp\": [\"C#\", \"<p><a href=\\\"https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9\\\" target=\\\"_blank\\\">C# 10 with .NET 6 runtime</a></p>\\r\\n\\r\\n<p>Your code is compiled with debug flag enabled (<code>/debug</code>).</p>\"], \"javascript\": [\"JavaScript\", \"<p><code>Node.js 16.13.2</code>.</p>\\r\\n\\r\\n<p>Your code is run with <code>--harmony</code> flag, enabling <a href=\\\"http://node.green/\\\" target=\\\"_blank\\\">new ES6 features</a>.</p>\\r\\n\\r\\n<p><a href=\\\"https://lodash.com\\\" target=\\\"_blank\\\">lodash.js</a> library is included by default.</p>\\r\\n\\r\\n<p>For Priority Queue / Queue data structures, you may use <a href=\\\"https://github.com/datastructures-js/priority-queue\\\" target=\\\"_blank\\\">datastructures-js/priority-queue</a> and <a href=\\\"https://github.com/datastructures-js/queue\\\" target=\\\"_blank\\\">datastructures-js/queue</a>.</p>\"], \"python3\": [\"Python3\", \"<p><code>Python 3.10</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/3/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/3/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/3/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,63 @@
{
"data": {
"question": {
"questionId": "1453",
"questionFrontendId": "1322",
"boundTopicId": null,
"title": "Ads Performance",
"titleSlug": "ads-performance",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 178,
"dislikes": 44,
"isLiked": null,
"similarQuestions": "[]",
"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\"]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"27.3K\", \"totalSubmission\": \"45.5K\", \"totalAcceptedRaw\": 27328, \"totalSubmissionRaw\": 45461, \"acRate\": \"60.1%\"}",
"hints": [],
"solution": null,
"status": null,
"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\"]]}}",
"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}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Ads (ad_id int, user_id int, action ENUM('Clicked', 'Viewed', 'Ignored'))",
"Truncate table Ads",
"insert into Ads (ad_id, user_id, action) values ('1', '1', 'Clicked')",
"insert into Ads (ad_id, user_id, action) values ('2', '2', 'Clicked')",
"insert into Ads (ad_id, user_id, action) values ('3', '3', 'Viewed')",
"insert into Ads (ad_id, user_id, action) values ('5', '5', 'Ignored')",
"insert into Ads (ad_id, user_id, action) values ('1', '7', 'Ignored')",
"insert into Ads (ad_id, user_id, action) values ('2', '7', 'Viewed')",
"insert into Ads (ad_id, user_id, action) values ('3', '5', 'Clicked')",
"insert into Ads (ad_id, user_id, action) values ('1', '4', 'Viewed')",
"insert into Ads (ad_id, user_id, action) values ('2', '11', 'Viewed')",
"insert into Ads (ad_id, user_id, action) values ('1', '2', 'Clicked')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,61 @@
{
"data": {
"question": {
"questionId": "1405",
"questionFrontendId": "1270",
"boundTopicId": null,
"title": "All People Report to the Given Manager",
"titleSlug": "all-people-report-to-the-given-manager",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 280,
"dislikes": 22,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Employees\":[\"employee_id\",\"employee_name\",\"manager_id\"]},\"rows\":{\"Employees\":[[1,\"Boss\",1],[3,\"Alice\",3],[2,\"Bob\",1],[4,\"Daniel\",2],[7,\"Luis\",4],[8,\"John\",3],[9,\"Angela\",8],[77,\"Robert\",1]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"36.9K\", \"totalSubmission\": \"41.9K\", \"totalAcceptedRaw\": 36859, \"totalSubmissionRaw\": 41865, \"acRate\": \"88.0%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Employees\":[\"employee_id\",\"employee_name\",\"manager_id\"]},\"rows\":{\"Employees\":[[1,\"Boss\",1],[3,\"Alice\",3],[2,\"Bob\",1],[4,\"Daniel\",2],[7,\"Luis\",4],[8,\"John\",3],[9,\"Angela\",8],[77,\"Robert\",1]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Employees (employee_id int, employee_name varchar(30), manager_id int)\"\n ],\n \"mssql\": [\n \"Create table Employees (employee_id int, employee_name varchar(30), manager_id int)\"\n ],\n \"oraclesql\": [\n \"Create table Employees (employee_id int, employee_name varchar(30), manager_id int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Employees (employee_id int, employee_name varchar(30), manager_id int)",
"Truncate table Employees",
"insert into Employees (employee_id, employee_name, manager_id) values ('1', 'Boss', '1')",
"insert into Employees (employee_id, employee_name, manager_id) values ('3', 'Alice', '3')",
"insert into Employees (employee_id, employee_name, manager_id) values ('2', 'Bob', '1')",
"insert into Employees (employee_id, employee_name, manager_id) values ('4', 'Daniel', '2')",
"insert into Employees (employee_id, employee_name, manager_id) values ('7', 'Luis', '4')",
"insert into Employees (employee_id, employee_name, manager_id) values ('8', 'John', '3')",
"insert into Employees (employee_id, employee_name, manager_id) values ('9', 'Angela', '8')",
"insert into Employees (employee_id, employee_name, manager_id) values ('77', 'Robert', '1')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,62 @@
{
"data": {
"question": {
"questionId": "2098",
"questionFrontendId": "1951",
"boundTopicId": null,
"title": "All the Pairs With the Maximum Number of Common Followers",
"titleSlug": "all-the-pairs-with-the-maximum-number-of-common-followers",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 27,
"dislikes": 2,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Relations\":[\"user_id\",\"follower_id\"]},\"rows\":{\"Relations\":[[1,3],[2,3],[7,3],[1,4],[2,4],[7,4],[1,5],[2,6],[7,5]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"3.2K\", \"totalSubmission\": \"4.5K\", \"totalAcceptedRaw\": 3233, \"totalSubmissionRaw\": 4506, \"acRate\": \"71.7%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Relations\":[\"user_id\",\"follower_id\"]},\"rows\":{\"Relations\":[[1,3],[2,3],[7,3],[1,4],[2,4],[7,4],[1,5],[2,6],[7,5]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Relations (user_id int, follower_id int)\"\n ],\n \"mssql\": [\n \"Create table Relations (user_id int, follower_id int)\"\n ],\n \"oraclesql\": [\n \"Create table Relations (user_id int, follower_id int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Relations (user_id int, follower_id int)",
"Truncate table Relations",
"insert into Relations (user_id, follower_id) values ('1', '3')",
"insert into Relations (user_id, follower_id) values ('2', '3')",
"insert into Relations (user_id, follower_id) values ('7', '3')",
"insert into Relations (user_id, follower_id) values ('1', '4')",
"insert into Relations (user_id, follower_id) values ('2', '4')",
"insert into Relations (user_id, follower_id) values ('7', '4')",
"insert into Relations (user_id, follower_id) values ('1', '5')",
"insert into Relations (user_id, follower_id) values ('2', '6')",
"insert into Relations (user_id, follower_id) values ('7', '5')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,63 @@
{
"data": {
"question": {
"questionId": "1763",
"questionFrontendId": "1623",
"boundTopicId": null,
"title": "All Valid Triplets That Can Represent a Country",
"titleSlug": "all-valid-triplets-that-can-represent-a-country",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 48,
"dislikes": 84,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"SchoolA\":[\"student_id\",\"student_name\"],\"SchoolB\":[\"student_id\",\"student_name\"],\"SchoolC\":[\"student_id\",\"student_name\"]},\"rows\":{\"SchoolA\":[[1,\"Alice\"],[2,\"Bob\"]],\"SchoolB\":[[3,\"Tom\"]],\"SchoolC\":[[3,\"Tom\"],[2,\"Jerry\"],[10,\"Alice\"]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"12.5K\", \"totalSubmission\": \"14.2K\", \"totalAcceptedRaw\": 12524, \"totalSubmissionRaw\": 14154, \"acRate\": \"88.5%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"SchoolA\":[\"student_id\",\"student_name\"],\"SchoolB\":[\"student_id\",\"student_name\"],\"SchoolC\":[\"student_id\",\"student_name\"]},\"rows\":{\"SchoolA\":[[1,\"Alice\"],[2,\"Bob\"]],\"SchoolB\":[[3,\"Tom\"]],\"SchoolC\":[[3,\"Tom\"],[2,\"Jerry\"],[10,\"Alice\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists SchoolA (student_id int, student_name varchar(20))\",\n \"Create table If Not Exists SchoolB (student_id int, student_name varchar(20))\",\n \"Create table If Not Exists SchoolC (student_id int, student_name varchar(20))\"\n ],\n \"mssql\": [\n \"Create table SchoolA (student_id int, student_name varchar(20))\",\n \"Create table SchoolB (student_id int, student_name varchar(20))\",\n \"Create table SchoolC (student_id int, student_name varchar(20))\"\n ],\n \"oraclesql\": [\n \"Create table SchoolA (student_id int, student_name varchar(20))\",\n \"Create table SchoolB (student_id int, student_name varchar(20))\",\n \"Create table SchoolC (student_id int, student_name varchar(20))\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists SchoolA (student_id int, student_name varchar(20))",
"Create table If Not Exists SchoolB (student_id int, student_name varchar(20))",
"Create table If Not Exists SchoolC (student_id int, student_name varchar(20))",
"Truncate table SchoolA",
"insert into SchoolA (student_id, student_name) values ('1', 'Alice')",
"insert into SchoolA (student_id, student_name) values ('2', 'Bob')",
"Truncate table SchoolB",
"insert into SchoolB (student_id, student_name) values ('3', 'Tom')",
"Truncate table SchoolC",
"insert into SchoolC (student_id, student_name) values ('3', 'Tom')",
"insert into SchoolC (student_id, student_name) values ('2', 'Jerry')",
"insert into SchoolC (student_id, student_name) values ('10', 'Alice')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__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

View File

@@ -0,0 +1,61 @@
{
"data": {
"question": {
"questionId": "1578",
"questionFrontendId": "1445",
"boundTopicId": null,
"title": "Apples & Oranges",
"titleSlug": "apples-oranges",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 126,
"dislikes": 17,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Sales\":[\"sale_date\",\"fruit\",\"sold_num\"]},\"rows\":{\"Sales\":[[\"2020-05-01\",\"apples\",10],[\"2020-05-01\",\"oranges\",8],[\"2020-05-02\",\"apples\",15],[\"2020-05-02\",\"oranges\",15],[\"2020-05-03\",\"apples\",20],[\"2020-05-03\",\"oranges\",0],[\"2020-05-04\",\"apples\",15],[\"2020-05-04\",\"oranges\",16]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"24.5K\", \"totalSubmission\": \"26.8K\", \"totalAcceptedRaw\": 24527, \"totalSubmissionRaw\": 26787, \"acRate\": \"91.6%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Sales\":[\"sale_date\",\"fruit\",\"sold_num\"]},\"rows\":{\"Sales\":[[\"2020-05-01\",\"apples\",10],[\"2020-05-01\",\"oranges\",8],[\"2020-05-02\",\"apples\",15],[\"2020-05-02\",\"oranges\",15],[\"2020-05-03\",\"apples\",20],[\"2020-05-03\",\"oranges\",0],[\"2020-05-04\",\"apples\",15],[\"2020-05-04\",\"oranges\",16]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Sales (sale_date date, fruit ENUM('apples', 'oranges'), sold_num int)\"\n ],\n \"mssql\": [\n \"Create Table Sales (sale_date date, fruit varchar(10) NOT NULL CHECK (fruit IN ('apples', 'oranges')), sold_num int)\"\n ],\n \"oraclesql\": [\n \"Create Table Sales (sale_date date, fruit varchar(10) NOT NULL CHECK (fruit IN ('apples', 'oranges')), sold_num int)\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Sales (sale_date date, fruit ENUM('apples', 'oranges'), sold_num int)",
"Truncate table Sales",
"insert into Sales (sale_date, fruit, sold_num) values ('2020-05-01', 'apples', '10')",
"insert into Sales (sale_date, fruit, sold_num) values ('2020-05-01', 'oranges', '8')",
"insert into Sales (sale_date, fruit, sold_num) values ('2020-05-02', 'apples', '15')",
"insert into Sales (sale_date, fruit, sold_num) values ('2020-05-02', 'oranges', '15')",
"insert into Sales (sale_date, fruit, sold_num) values ('2020-05-03', 'apples', '20')",
"insert into Sales (sale_date, fruit, sold_num) values ('2020-05-03', 'oranges', '0')",
"insert into Sales (sale_date, fruit, sold_num) values ('2020-05-04', 'apples', '15')",
"insert into Sales (sale_date, fruit, sold_num) values ('2020-05-04', 'oranges', '16')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,61 @@
{
"data": {
"question": {
"questionId": "1259",
"questionFrontendId": "1149",
"boundTopicId": null,
"title": "Article Views II",
"titleSlug": "article-views-ii",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 80,
"dislikes": 25,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Views\":[\"article_id\",\"author_id\",\"viewer_id\",\"view_date\"]},\"rows\":{\"Views\":[[1,3,5,\"2019-08-01\"],[3,4,5,\"2019-08-01\"],[1,3,6,\"2019-08-02\"],[2,7,7,\"2019-08-01\"],[2,7,6,\"2019-08-02\"],[4,7,1,\"2019-07-22\"],[3,4,4,\"2019-07-21\"],[3,4,4,\"2019-07-21\"]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"23.7K\", \"totalSubmission\": \"49.6K\", \"totalAcceptedRaw\": 23744, \"totalSubmissionRaw\": 49600, \"acRate\": \"47.9%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Views\":[\"article_id\",\"author_id\",\"viewer_id\",\"view_date\"]},\"rows\":{\"Views\":[[1,3,5,\"2019-08-01\"],[3,4,5,\"2019-08-01\"],[1,3,6,\"2019-08-02\"],[2,7,7,\"2019-08-01\"],[2,7,6,\"2019-08-02\"],[4,7,1,\"2019-07-22\"],[3,4,4,\"2019-07-21\"],[3,4,4,\"2019-07-21\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Views (article_id int, author_id int, viewer_id int, view_date date)\"\n ],\n \"mssql\": [\n \"Create table Views (article_id int, author_id int, viewer_id int, view_date date)\"\n ],\n \"oraclesql\": [\n \"Create table Views (article_id int, author_id int, viewer_id int, view_date date)\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Views (article_id int, author_id int, viewer_id int, view_date date)",
"Truncate table Views",
"insert into Views (article_id, author_id, viewer_id, view_date) values ('1', '3', '5', '2019-08-01')",
"insert into Views (article_id, author_id, viewer_id, view_date) values ('3', '4', '5', '2019-08-01')",
"insert into Views (article_id, author_id, viewer_id, view_date) values ('1', '3', '6', '2019-08-02')",
"insert into Views (article_id, author_id, viewer_id, view_date) values ('2', '7', '7', '2019-08-01')",
"insert into Views (article_id, author_id, viewer_id, view_date) values ('2', '7', '6', '2019-08-02')",
"insert into Views (article_id, author_id, viewer_id, view_date) values ('4', '7', '1', '2019-07-22')",
"insert into Views (article_id, author_id, viewer_id, view_date) values ('3', '4', '4', '2019-07-21')",
"insert into Views (article_id, author_id, viewer_id, view_date) values ('3', '4', '4', '2019-07-21')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,71 @@
{
"data": {
"question": {
"questionId": "615",
"questionFrontendId": "615",
"boundTopicId": null,
"title": "Average Salary: Departments VS Company",
"titleSlug": "average-salary-departments-vs-company",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 171,
"dislikes": 58,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Countries You Can Safely Invest In\", \"titleSlug\": \"countries-you-can-safely-invest-in\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "{\"headers\":{\"Salary\":[\"id\",\"employee_id\",\"amount\",\"pay_date\"],\"Employee\":[\"employee_id\",\"department_id\"]},\"rows\":{\"Salary\":[[1,1,9000,\"2017/03/31\"],[2,2,6000,\"2017/03/31\"],[3,3,10000,\"2017/03/31\"],[4,1,7000,\"2017/02/28\"],[5,2,6000,\"2017/02/28\"],[6,3,8000,\"2017/02/28\"]],\"Employee\":[[1,1],[2,2],[3,2]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"25.2K\", \"totalSubmission\": \"44.9K\", \"totalAcceptedRaw\": 25183, \"totalSubmissionRaw\": 44907, \"acRate\": \"56.1%\"}",
"hints": [],
"solution": {
"id": "169",
"canSeeDetail": true,
"paidOnly": false,
"hasVideoSolution": false,
"paidOnlyVideo": true,
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "{\"headers\":{\"Salary\":[\"id\",\"employee_id\",\"amount\",\"pay_date\"],\"Employee\":[\"employee_id\",\"department_id\"]},\"rows\":{\"Salary\":[[1,1,9000,\"2017/03/31\"],[2,2,6000,\"2017/03/31\"],[3,3,10000,\"2017/03/31\"],[4,1,7000,\"2017/02/28\"],[5,2,6000,\"2017/02/28\"],[6,3,8000,\"2017/02/28\"]],\"Employee\":[[1,1],[2,2],[3,2]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Salary (id int, employee_id int, amount int, pay_date date)\",\n \"Create table If Not Exists Employee (employee_id int, department_id int)\"\n ],\n \"mssql\": [\n \"Create table Salary (id int, employee_id int, amount int, pay_date date)\",\n \"Create table Employee (employee_id int, department_id int)\"\n ],\n \"oraclesql\": [\n \"Create table Salary (id int, employee_id int, amount int, pay_date date)\",\n \"Create table Employee (employee_id int, department_id int)\",\n \"alter SESSION set NLS_DATE_FORMAT = 'YYYY/MM/DD'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Salary (id int, employee_id int, amount int, pay_date date)",
"Create table If Not Exists Employee (employee_id int, department_id int)",
"Truncate table Salary",
"insert into Salary (id, employee_id, amount, pay_date) values ('1', '1', '9000', '2017/03/31')",
"insert into Salary (id, employee_id, amount, pay_date) values ('2', '2', '6000', '2017/03/31')",
"insert into Salary (id, employee_id, amount, pay_date) values ('3', '3', '10000', '2017/03/31')",
"insert into Salary (id, employee_id, amount, pay_date) values ('4', '1', '7000', '2017/02/28')",
"insert into Salary (id, employee_id, amount, pay_date) values ('5', '2', '6000', '2017/02/28')",
"insert into Salary (id, employee_id, amount, pay_date) values ('6', '3', '8000', '2017/02/28')",
"Truncate table Employee",
"insert into Employee (employee_id, department_id) values ('1', '1')",
"insert into Employee (employee_id, department_id) values ('2', '2')",
"insert into Employee (employee_id, department_id) values ('3', '2')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,63 @@
{
"data": {
"question": {
"questionId": "1390",
"questionFrontendId": "1251",
"boundTopicId": null,
"title": "Average Selling Price",
"titleSlug": "average-selling-price",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 212,
"dislikes": 20,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Prices\":[\"product_id\",\"start_date\",\"end_date\",\"price\"],\"UnitsSold\":[\"product_id\",\"purchase_date\",\"units\"]},\"rows\":{\"Prices\":[[1,\"2019-02-17\",\"2019-02-28\",5],[1,\"2019-03-01\",\"2019-03-22\",20],[2,\"2019-02-01\",\"2019-02-20\",15],[2,\"2019-02-21\",\"2019-03-31\",30]],\"UnitsSold\":[[1,\"2019-02-25\",100],[1,\"2019-03-01\",15],[2,\"2019-02-10\",200],[2,\"2019-03-22\",30]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"32.6K\", \"totalSubmission\": \"39.2K\", \"totalAcceptedRaw\": 32640, \"totalSubmissionRaw\": 39155, \"acRate\": \"83.4%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Prices\":[\"product_id\",\"start_date\",\"end_date\",\"price\"],\"UnitsSold\":[\"product_id\",\"purchase_date\",\"units\"]},\"rows\":{\"Prices\":[[1,\"2019-02-17\",\"2019-02-28\",5],[1,\"2019-03-01\",\"2019-03-22\",20],[2,\"2019-02-01\",\"2019-02-20\",15],[2,\"2019-02-21\",\"2019-03-31\",30]],\"UnitsSold\":[[1,\"2019-02-25\",100],[1,\"2019-03-01\",15],[2,\"2019-02-10\",200],[2,\"2019-03-22\",30]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Prices (product_id int, start_date date, end_date date, price int)\",\n \"Create table If Not Exists UnitsSold (product_id int, purchase_date date, units int)\"\n ],\n \"mssql\": [\n \"Create table Prices (product_id int, start_date date, end_date date, price int)\",\n \"Create table UnitsSold (product_id int, purchase_date date, units int)\"\n ],\n \"oraclesql\": [\n \"Create table Prices (product_id int, start_date date, end_date date, price int)\",\n \"Create table UnitsSold (product_id int, purchase_date date, units int)\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Prices (product_id int, start_date date, end_date date, price int)",
"Create table If Not Exists UnitsSold (product_id int, purchase_date date, units int)",
"Truncate table Prices",
"insert into Prices (product_id, start_date, end_date, price) values ('1', '2019-02-17', '2019-02-28', '5')",
"insert into Prices (product_id, start_date, end_date, price) values ('1', '2019-03-01', '2019-03-22', '20')",
"insert into Prices (product_id, start_date, end_date, price) values ('2', '2019-02-01', '2019-02-20', '15')",
"insert into Prices (product_id, start_date, end_date, price) values ('2', '2019-02-21', '2019-03-31', '30')",
"Truncate table UnitsSold",
"insert into UnitsSold (product_id, purchase_date, units) values ('1', '2019-02-25', '100')",
"insert into UnitsSold (product_id, purchase_date, units) values ('1', '2019-03-01', '15')",
"insert into UnitsSold (product_id, purchase_date, units) values ('2', '2019-02-10', '200')",
"insert into UnitsSold (product_id, purchase_date, units) values ('2', '2019-03-22', '30')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,65 @@
{
"data": {
"question": {
"questionId": "1801",
"questionFrontendId": "1661",
"boundTopicId": null,
"title": "Average Time of Process per Machine",
"titleSlug": "average-time-of-process-per-machine",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 85,
"dislikes": 19,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Activity\":[\"machine_id\",\"process_id\",\"activity_type\",\"timestamp\"]},\"rows\":{\"Activity\":[[0,0,\"start\",0.712],[0,0,\"end\",1.52],[0,1,\"start\",3.14],[0,1,\"end\",4.12],[1,0,\"start\",0.55],[1,0,\"end\",1.55],[1,1,\"start\",0.43],[1,1,\"end\",1.42],[2,0,\"start\",4.1],[2,0,\"end\",4.512],[2,1,\"start\",2.5],[2,1,\"end\",5]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"14.9K\", \"totalSubmission\": \"18.7K\", \"totalAcceptedRaw\": 14920, \"totalSubmissionRaw\": 18693, \"acRate\": \"79.8%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Activity\":[\"machine_id\",\"process_id\",\"activity_type\",\"timestamp\"]},\"rows\":{\"Activity\":[[0,0,\"start\",0.712],[0,0,\"end\",1.52],[0,1,\"start\",3.14],[0,1,\"end\",4.12],[1,0,\"start\",0.55],[1,0,\"end\",1.55],[1,1,\"start\",0.43],[1,1,\"end\",1.42],[2,0,\"start\",4.1],[2,0,\"end\",4.512],[2,1,\"start\",2.5],[2,1,\"end\",5]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Activity (machine_id int, process_id int, activity_type ENUM('start', 'end'), timestamp float)\"\n ],\n \"mssql\": [\n \"create table Activity (machine_id int, process_id int, activity_type varchar(15) not null check(activity_type in ('start', 'end')), timestamp float)\"\n ],\n \"oraclesql\": [\n \"create table Activity (machine_id int, process_id int, activity_type varchar(15) not null check(activity_type in ('start', 'end')), timestamp float)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Activity (machine_id int, process_id int, activity_type ENUM('start', 'end'), timestamp float)",
"Truncate table Activity",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('0', '0', 'start', '0.712')",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('0', '0', 'end', '1.52')",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('0', '1', 'start', '3.14')",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('0', '1', 'end', '4.12')",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('1', '0', 'start', '0.55')",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('1', '0', 'end', '1.55')",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('1', '1', 'start', '0.43')",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('1', '1', 'end', '1.42')",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('2', '0', 'start', '4.1')",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('2', '0', 'end', '4.512')",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('2', '1', 'start', '2.5')",
"insert into Activity (machine_id, process_id, activity_type, timestamp) values ('2', '1', 'end', '5')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,62 @@
{
"data": {
"question": {
"questionId": "1702",
"questionFrontendId": "1555",
"boundTopicId": null,
"title": "Bank Account Summary",
"titleSlug": "bank-account-summary",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 85,
"dislikes": 21,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\": {\"Users\": [\"user_id\", \"user_name\", \"credit\"], \"Transactions\": [\"trans_id\", \"paid_by\", \"paid_to\", \"amount\", \"transacted_on\"]}, \"rows\": {\"Users\": [[1, \"Moustafa\", 100], [2, \"Jonathan\", 200], [3, \"Winston\", 10000], [4, \"Luis\", 800]], \"Transactions\": [[1, 1, 3, 400, \"2020-08-01\"], [2, 3, 2, 500, \"2020-08-02\"], [3, 2, 1, 200, \"2020-08-03\"]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"10.1K\", \"totalSubmission\": \"19K\", \"totalAcceptedRaw\": 10121, \"totalSubmissionRaw\": 18965, \"acRate\": \"53.4%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\": {\"Users\": [\"user_id\", \"user_name\", \"credit\"], \"Transactions\": [\"trans_id\", \"paid_by\", \"paid_to\", \"amount\", \"transacted_on\"]}, \"rows\": {\"Users\": [[1, \"Moustafa\", 100], [2, \"Jonathan\", 200], [3, \"Winston\", 10000], [4, \"Luis\", 800]], \"Transactions\": [[1, 1, 3, 400, \"2020-08-01\"], [2, 3, 2, 500, \"2020-08-02\"], [3, 2, 1, 200, \"2020-08-03\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Users (user_id int, user_name varchar(20), credit int)\\n\",\n \"Create table If Not Exists Transactions (trans_id int, paid_by int, paid_to int, amount int, transacted_on date)\"\n ],\n \"mssql\": [\n \"Create table Users (user_id int, user_name varchar(20), credit int)\\n\",\n \"Create table Transactions (trans_id int, paid_by int, paid_to int, amount int, transacted_on date)\\n\"\n ],\n \"oraclesql\": [\n \"Create table Users (user_id int, user_name varchar(20), credit int)\\n\",\n \"Create table Transactions (trans_id int, paid_by int, paid_to int, amount int, transacted_on date)\\n\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\\n\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Users (user_id int, user_name varchar(20), credit int)\n",
"Create table If Not Exists Transactions (trans_id int, paid_by int, paid_to int, amount int, transacted_on date)",
"Truncate table Users",
"insert into Users (user_id, user_name, credit) values ('1', 'Moustafa', '100')",
"insert into Users (user_id, user_name, credit) values ('2', 'Jonathan', '200')",
"insert into Users (user_id, user_name, credit) values ('3', 'Winston', '10000')",
"insert into Users (user_id, user_name, credit) values ('4', 'Luis', '800')",
"Truncate table Transactions",
"insert into Transactions (trans_id, paid_by, paid_to, amount, transacted_on) values ('1', '1', '3', '400', '2020-08-01')",
"insert into Transactions (trans_id, paid_by, paid_to, amount, transacted_on) values ('2', '3', '2', '500', '2020-08-02')",
"insert into Transactions (trans_id, paid_by, paid_to, amount, transacted_on) values ('3', '2', '1', '200', '2020-08-03')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__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

View File

@@ -0,0 +1,68 @@
{
"data": {
"question": {
"questionId": "619",
"questionFrontendId": "619",
"boundTopicId": null,
"title": "Biggest Single Number",
"titleSlug": "biggest-single-number",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 116,
"dislikes": 104,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\": {\"MyNumbers\": [\"num\"]}, \"rows\": {\"MyNumbers\": [[8],[8],[3],[3],[1],[4],[5],[6]]}}\n{\"headers\": {\"MyNumbers\": [\"num\"]}, \"rows\": {\"MyNumbers\": [[8],[8],[7],[7],[3],[3],[3]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"44.1K\", \"totalSubmission\": \"93.2K\", \"totalAcceptedRaw\": 44098, \"totalSubmissionRaw\": 93173, \"acRate\": \"47.3%\"}",
"hints": [],
"solution": {
"id": "188",
"canSeeDetail": true,
"paidOnly": false,
"hasVideoSolution": false,
"paidOnlyVideo": true,
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "{\"headers\": {\"MyNumbers\": [\"num\"]}, \"rows\": {\"MyNumbers\": [[8],[8],[3],[3],[1],[4],[5],[6]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists MyNumbers (num int)\"\n ],\n \"mssql\": [\n \"Create table MyNumbers (num int)\"\n ],\n \"oraclesql\": [\n \"Create table MyNumbers (num int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists MyNumbers (num int)",
"Truncate table MyNumbers",
"insert into MyNumbers (num) values ('8')",
"insert into MyNumbers (num) values ('8')",
"insert into MyNumbers (num) values ('3')",
"insert into MyNumbers (num) values ('3')",
"insert into MyNumbers (num) values ('1')",
"insert into MyNumbers (num) values ('4')",
"insert into MyNumbers (num) values ('5')",
"insert into MyNumbers (num) values ('6')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,59 @@
{
"data": {
"question": {
"questionId": "1852",
"questionFrontendId": "1709",
"boundTopicId": null,
"title": "Biggest Window Between Visits",
"titleSlug": "biggest-window-between-visits",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 92,
"dislikes": 4,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"UserVisits\":[\"user_id\",\"visit_date\"]},\"rows\":{\"UserVisits\":[[\"1\",\"2020-11-28\"],[\"1\",\"2020-10-20\"],[\"1\",\"2020-12-3\"],[\"2\",\"2020-10-5\"],[\"2\",\"2020-12-9\"],[\"3\",\"2020-11-11\"]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"9.4K\", \"totalSubmission\": \"12K\", \"totalAcceptedRaw\": 9371, \"totalSubmissionRaw\": 11981, \"acRate\": \"78.2%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"UserVisits\":[\"user_id\",\"visit_date\"]},\"rows\":{\"UserVisits\":[[\"1\",\"2020-11-28\"],[\"1\",\"2020-10-20\"],[\"1\",\"2020-12-3\"],[\"2\",\"2020-10-5\"],[\"2\",\"2020-12-9\"],[\"3\",\"2020-11-11\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists UserVisits(user_id int, visit_date date)\"\n ],\n \"mssql\": [\n \"Create table UserVisits(user_id int, visit_date date)\"\n ],\n \"oraclesql\": [\n \"Create table UserVisits(user_id int, visit_date date)\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists UserVisits(user_id int, visit_date date)",
"Truncate table UserVisits",
"insert into UserVisits (user_id, visit_date) values ('1', '2020-11-28')",
"insert into UserVisits (user_id, visit_date) values ('1', '2020-10-20')",
"insert into UserVisits (user_id, visit_date) values ('1', '2020-12-3')",
"insert into UserVisits (user_id, visit_date) values ('2', '2020-10-5')",
"insert into UserVisits (user_id, visit_date) values ('2', '2020-12-9')",
"insert into UserVisits (user_id, visit_date) values ('3', '2020-11-11')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__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

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

View File

@@ -0,0 +1,71 @@
{
"data": {
"question": {
"questionId": "1736",
"questionFrontendId": "1597",
"boundTopicId": null,
"title": "Build Binary Expression Tree From Infix Expression",
"titleSlug": "build-binary-expression-tree-from-infix-expression",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 142,
"dislikes": 27,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Basic Calculator III\", \"titleSlug\": \"basic-calculator-iii\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Check If Two Expression Trees are Equivalent\", \"titleSlug\": \"check-if-two-expression-trees-are-equivalent\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "\"3*4-2*5\"\n\"2-3/(5*2)+1\"\n\"1+2+3+4+5\"",
"categoryTitle": "Algorithms",
"contributors": [],
"topicTags": [
{
"name": "String",
"slug": "string",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Stack",
"slug": "stack",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Tree",
"slug": "tree",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Binary Tree",
"slug": "binary-tree",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"6.3K\", \"totalSubmission\": \"10.7K\", \"totalAcceptedRaw\": 6340, \"totalSubmissionRaw\": 10652, \"acRate\": \"59.5%\"}",
"hints": [
"Convert infix expression to postfix expression.",
"Build an expression tree from the postfix expression."
],
"solution": null,
"status": null,
"sampleTestCase": "\"3*4-2*5\"",
"metaData": "{\n \"name\": \"expTree\",\n \"params\": [\n {\n \"name\": \"s\",\n \"type\": \"string\"\n }\n ],\n \"return\": {\n \"type\": \"TreeNode\"\n },\n \"languages\": [\n \"cpp\",\n \"java\",\n \"python\",\n \"python3\",\n \"csharp\",\n \"javascript\"\n ],\n \"manual\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": true,
"envInfo": "{\"cpp\": [\"C++\", \"<p>Compiled with <code> clang 11 </code> using the latest C++ 17 standard.</p>\\r\\n\\r\\n<p>Your code is compiled with level two optimization (<code>-O2</code>). <a href=\\\"https://github.com/google/sanitizers/wiki/AddressSanitizer\\\" target=\\\"_blank\\\">AddressSanitizer</a> is also enabled to help detect out-of-bounds and use-after-free bugs.</p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\"], \"java\": [\"Java\", \"<p><code> OpenJDK 17 </code>. Java 8 features such as lambda expressions and stream API can be used. </p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\\r\\n<p>Includes <code>Pair</code> class from https://docs.oracle.com/javase/8/javafx/api/javafx/util/Pair.html.</p>\"], \"python\": [\"Python\", \"<p><code>Python 2.7.12</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/2/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/2/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/2/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\\r\\n\\r\\n<p>Note that Python 2.7 <a href=\\\"https://www.python.org/dev/peps/pep-0373/\\\" target=\\\"_blank\\\">will not be maintained past 2020</a>. For the latest Python, please choose Python3 instead.</p>\"], \"csharp\": [\"C#\", \"<p><a href=\\\"https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9\\\" target=\\\"_blank\\\">C# 10 with .NET 6 runtime</a></p>\\r\\n\\r\\n<p>Your code is compiled with debug flag enabled (<code>/debug</code>).</p>\"], \"javascript\": [\"JavaScript\", \"<p><code>Node.js 16.13.2</code>.</p>\\r\\n\\r\\n<p>Your code is run with <code>--harmony</code> flag, enabling <a href=\\\"http://node.green/\\\" target=\\\"_blank\\\">new ES6 features</a>.</p>\\r\\n\\r\\n<p><a href=\\\"https://lodash.com\\\" target=\\\"_blank\\\">lodash.js</a> library is included by default.</p>\\r\\n\\r\\n<p>For Priority Queue / Queue data structures, you may use <a href=\\\"https://github.com/datastructures-js/priority-queue\\\" target=\\\"_blank\\\">datastructures-js/priority-queue</a> and <a href=\\\"https://github.com/datastructures-js/queue\\\" target=\\\"_blank\\\">datastructures-js/queue</a>.</p>\"], \"python3\": [\"Python3\", \"<p><code>Python 3.10</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/3/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/3/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/3/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,56 @@
{
"data": {
"question": {
"questionId": "2253",
"questionFrontendId": "2118",
"boundTopicId": null,
"title": "Build the Equation",
"titleSlug": "build-the-equation",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 10,
"dislikes": 13,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Terms\":[\"power\",\"factor\"]},\"rows\":{\"Terms\":[[2,1],[1,-4],[0,2]]}}\n{\"headers\":{\"Terms\":[\"power\",\"factor\"]},\"rows\":{\"Terms\":[[4,-4],[2,1],[1,-1]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"568\", \"totalSubmission\": \"995\", \"totalAcceptedRaw\": 568, \"totalSubmissionRaw\": 995, \"acRate\": \"57.1%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Terms\":[\"power\",\"factor\"]},\"rows\":{\"Terms\":[[2,1],[1,-4],[0,2]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Terms (power int, factor int)\"\n ],\n \"mssql\": [\n \"Create table Terms (power int, factor int)\"\n ],\n \"oraclesql\": [\n \"Create table Terms (power int, factor int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Terms (power int, factor int)",
"Truncate table Terms",
"insert into Terms (power, factor) values ('2', '1')",
"insert into Terms (power, factor) values ('1', '-4')",
"insert into Terms (power, factor) values ('0', '2')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,63 @@
{
"data": {
"question": {
"questionId": "1608",
"questionFrontendId": "1468",
"boundTopicId": null,
"title": "Calculate Salaries",
"titleSlug": "calculate-salaries",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 77,
"dislikes": 16,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Salaries\":[\"company_id\",\"employee_id\",\"employee_name\",\"salary\"]},\"rows\":{\"Salaries\":[[1,1,\"Tony\",2000],[1,2,\"Pronub\",21300],[1,3,\"Tyrrox\",10800],[2,1,\"Pam\",300],[2,7,\"Bassem\",450],[2,9,\"Hermione\",700],[3,7,\"Bocaben\",100],[3,2,\"Ognjen\",2200],[3,13,\"Nyancat\",3300],[3,15,\"Morninngcat\",7777]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"14.6K\", \"totalSubmission\": \"17.7K\", \"totalAcceptedRaw\": 14615, \"totalSubmissionRaw\": 17733, \"acRate\": \"82.4%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Salaries\":[\"company_id\",\"employee_id\",\"employee_name\",\"salary\"]},\"rows\":{\"Salaries\":[[1,1,\"Tony\",2000],[1,2,\"Pronub\",21300],[1,3,\"Tyrrox\",10800],[2,1,\"Pam\",300],[2,7,\"Bassem\",450],[2,9,\"Hermione\",700],[3,7,\"Bocaben\",100],[3,2,\"Ognjen\",2200],[3,13,\"Nyancat\",3300],[3,15,\"Morninngcat\",7777]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Salaries (company_id int, employee_id int, employee_name varchar(13), salary int)\"\n ],\n \"mssql\": [\n \"Create table Salaries (company_id int, employee_id int, employee_name varchar(13), salary int)\"\n ],\n \"oraclesql\": [\n \"Create table Salaries (company_id int, employee_id int, employee_name varchar(13), salary int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Salaries (company_id int, employee_id int, employee_name varchar(13), salary int)",
"Truncate table Salaries",
"insert into Salaries (company_id, employee_id, employee_name, salary) values ('1', '1', 'Tony', '2000')",
"insert into Salaries (company_id, employee_id, employee_name, salary) values ('1', '2', 'Pronub', '21300')",
"insert into Salaries (company_id, employee_id, employee_name, salary) values ('1', '3', 'Tyrrox', '10800')",
"insert into Salaries (company_id, employee_id, employee_name, salary) values ('2', '1', 'Pam', '300')",
"insert into Salaries (company_id, employee_id, employee_name, salary) values ('2', '7', 'Bassem', '450')",
"insert into Salaries (company_id, employee_id, employee_name, salary) values ('2', '9', 'Hermione', '700')",
"insert into Salaries (company_id, employee_id, employee_name, salary) values ('3', '7', 'Bocaben', '100')",
"insert into Salaries (company_id, employee_id, employee_name, salary) values ('3', '2', 'Ognjen', '2200')",
"insert into Salaries (company_id, employee_id, employee_name, salary) values ('3', '13', 'Nyancat', '3300')",
"insert into Salaries (company_id, employee_id, employee_name, salary) values ('3', '15', 'Morninngcat', '7777')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__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

View File

@@ -0,0 +1,65 @@
{
"data": {
"question": {
"questionId": "1810",
"questionFrontendId": "1666",
"boundTopicId": null,
"title": "Change the Root of a Binary Tree",
"titleSlug": "change-the-root-of-a-binary-tree",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 44,
"dislikes": 108,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "[3,5,1,6,2,0,8,null,null,7,4]\n7\n[3,5,1,6,2,0,8,null,null,7,4]\n0",
"categoryTitle": "Algorithms",
"contributors": [],
"topicTags": [
{
"name": "Tree",
"slug": "tree",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Depth-First Search",
"slug": "depth-first-search",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Binary Tree",
"slug": "binary-tree",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"2.3K\", \"totalSubmission\": \"3.3K\", \"totalAcceptedRaw\": 2269, \"totalSubmissionRaw\": 3337, \"acRate\": \"68.0%\"}",
"hints": [
"Start traversing from the leaf. Always go up till you reach the root.",
"Change pointers as asked, make the current node's parent its left child, and make the left child the right one if needed."
],
"solution": null,
"status": null,
"sampleTestCase": "[3,5,1,6,2,0,8,null,null,7,4]\n7",
"metaData": "{\n \"name\": \"foobar\",\n \"params\": [\n {\n \"name\": \"root\",\n \"type\": \"TreeNode\"\n },\n {\n \"type\": \"integer\",\n \"name\": \"leaf\"\n }\n ],\n \"return\": {\n \"type\": \"integer\"\n },\n \"manual\": true,\n \"languages\": [\n \"cpp\",\n \"java\",\n \"python\",\n \"csharp\",\n \"javascript\",\n \"python3\"\n ]\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": true,
"envInfo": "{\"cpp\": [\"C++\", \"<p>Compiled with <code> clang 11 </code> using the latest C++ 17 standard.</p>\\r\\n\\r\\n<p>Your code is compiled with level two optimization (<code>-O2</code>). <a href=\\\"https://github.com/google/sanitizers/wiki/AddressSanitizer\\\" target=\\\"_blank\\\">AddressSanitizer</a> is also enabled to help detect out-of-bounds and use-after-free bugs.</p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\"], \"java\": [\"Java\", \"<p><code> OpenJDK 17 </code>. Java 8 features such as lambda expressions and stream API can be used. </p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\\r\\n<p>Includes <code>Pair</code> class from https://docs.oracle.com/javase/8/javafx/api/javafx/util/Pair.html.</p>\"], \"python\": [\"Python\", \"<p><code>Python 2.7.12</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/2/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/2/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/2/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\\r\\n\\r\\n<p>Note that Python 2.7 <a href=\\\"https://www.python.org/dev/peps/pep-0373/\\\" target=\\\"_blank\\\">will not be maintained past 2020</a>. For the latest Python, please choose Python3 instead.</p>\"], \"csharp\": [\"C#\", \"<p><a href=\\\"https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9\\\" target=\\\"_blank\\\">C# 10 with .NET 6 runtime</a></p>\\r\\n\\r\\n<p>Your code is compiled with debug flag enabled (<code>/debug</code>).</p>\"], \"javascript\": [\"JavaScript\", \"<p><code>Node.js 16.13.2</code>.</p>\\r\\n\\r\\n<p>Your code is run with <code>--harmony</code> flag, enabling <a href=\\\"http://node.green/\\\" target=\\\"_blank\\\">new ES6 features</a>.</p>\\r\\n\\r\\n<p><a href=\\\"https://lodash.com\\\" target=\\\"_blank\\\">lodash.js</a> library is included by default.</p>\\r\\n\\r\\n<p>For Priority Queue / Queue data structures, you may use <a href=\\\"https://github.com/datastructures-js/priority-queue\\\" target=\\\"_blank\\\">datastructures-js/priority-queue</a> and <a href=\\\"https://github.com/datastructures-js/queue\\\" target=\\\"_blank\\\">datastructures-js/queue</a>.</p>\"], \"python3\": [\"Python3\", \"<p><code>Python 3.10</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/3/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/3/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/3/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,65 @@
{
"data": {
"question": {
"questionId": "1750",
"questionFrontendId": "1612",
"boundTopicId": null,
"title": "Check If Two Expression Trees are Equivalent",
"titleSlug": "check-if-two-expression-trees-are-equivalent",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 97,
"dislikes": 17,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Build Binary Expression Tree From Infix Expression\", \"titleSlug\": \"build-binary-expression-tree-from-infix-expression\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]",
"exampleTestcases": "[x]\n[x]\n[+,a,+,null,null,b,c]\n[+,+,a,b,c]\n[+,a,+,null,null,b,c]\n[+,+,a,b,d]",
"categoryTitle": "Algorithms",
"contributors": [],
"topicTags": [
{
"name": "Tree",
"slug": "tree",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Depth-First Search",
"slug": "depth-first-search",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Binary Tree",
"slug": "binary-tree",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"4.7K\", \"totalSubmission\": \"6.8K\", \"totalAcceptedRaw\": 4713, \"totalSubmissionRaw\": 6806, \"acRate\": \"69.2%\"}",
"hints": [
"Count for each variable how many times it appeared in the first tree.",
"Do the same for the second tree and check if the count is the same for both tree."
],
"solution": null,
"status": null,
"sampleTestCase": "[x]\n[x]",
"metaData": "{\n \"name\": \"checkEquivalence\",\n \"params\": [\n {\n \"name\": \"root1\",\n \"type\": \"TreeNode\"\n },\n {\n \"type\": \"TreeNode\",\n \"name\": \"root2\"\n }\n ],\n \"return\": {\n \"type\": \"boolean\"\n },\n \"languages\": [\n \"cpp\",\n \"java\",\n \"python\",\n \"csharp\",\n \"python3\",\n \"javascript\"\n ],\n \"manual\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": true,
"envInfo": "{\"cpp\": [\"C++\", \"<p>Compiled with <code> clang 11 </code> using the latest C++ 17 standard.</p>\\r\\n\\r\\n<p>Your code is compiled with level two optimization (<code>-O2</code>). <a href=\\\"https://github.com/google/sanitizers/wiki/AddressSanitizer\\\" target=\\\"_blank\\\">AddressSanitizer</a> is also enabled to help detect out-of-bounds and use-after-free bugs.</p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\"], \"java\": [\"Java\", \"<p><code> OpenJDK 17 </code>. Java 8 features such as lambda expressions and stream API can be used. </p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\\r\\n<p>Includes <code>Pair</code> class from https://docs.oracle.com/javase/8/javafx/api/javafx/util/Pair.html.</p>\"], \"python\": [\"Python\", \"<p><code>Python 2.7.12</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/2/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/2/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/2/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\\r\\n\\r\\n<p>Note that Python 2.7 <a href=\\\"https://www.python.org/dev/peps/pep-0373/\\\" target=\\\"_blank\\\">will not be maintained past 2020</a>. For the latest Python, please choose Python3 instead.</p>\"], \"csharp\": [\"C#\", \"<p><a href=\\\"https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9\\\" target=\\\"_blank\\\">C# 10 with .NET 6 runtime</a></p>\\r\\n\\r\\n<p>Your code is compiled with debug flag enabled (<code>/debug</code>).</p>\"], \"javascript\": [\"JavaScript\", \"<p><code>Node.js 16.13.2</code>.</p>\\r\\n\\r\\n<p>Your code is run with <code>--harmony</code> flag, enabling <a href=\\\"http://node.green/\\\" target=\\\"_blank\\\">new ES6 features</a>.</p>\\r\\n\\r\\n<p><a href=\\\"https://lodash.com\\\" target=\\\"_blank\\\">lodash.js</a> library is included by default.</p>\\r\\n\\r\\n<p>For Priority Queue / Queue data structures, you may use <a href=\\\"https://github.com/datastructures-js/priority-queue\\\" target=\\\"_blank\\\">datastructures-js/priority-queue</a> and <a href=\\\"https://github.com/datastructures-js/queue\\\" target=\\\"_blank\\\">datastructures-js/queue</a>.</p>\"], \"python3\": [\"Python3\", \"<p><code>Python 3.10</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/3/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/3/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/3/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,84 @@
{
"data": {
"question": {
"questionId": "1624",
"questionFrontendId": "1485",
"boundTopicId": null,
"title": "Clone Binary Tree With Random Pointer",
"titleSlug": "clone-binary-tree-with-random-pointer",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 276,
"dislikes": 43,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Clone Graph\", \"titleSlug\": \"clone-graph\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Copy List with Random Pointer\", \"titleSlug\": \"copy-list-with-random-pointer\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Clone N-ary Tree\", \"titleSlug\": \"clone-n-ary-tree\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "[[1,null],null,[4,3],[7,0]]\n[[1,4],null,[1,0],null,[1,5],[1,5]]\n[[1,6],[2,5],[3,4],[4,3],[5,2],[6,1],[7,0]]",
"categoryTitle": "Algorithms",
"contributors": [],
"topicTags": [
{
"name": "Hash Table",
"slug": "hash-table",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Tree",
"slug": "tree",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Depth-First Search",
"slug": "depth-first-search",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Breadth-First Search",
"slug": "breadth-first-search",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Binary Tree",
"slug": "binary-tree",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"15.8K\", \"totalSubmission\": \"19.8K\", \"totalAcceptedRaw\": 15830, \"totalSubmissionRaw\": 19825, \"acRate\": \"79.8%\"}",
"hints": [
"Traverse the tree, keep a hashtable with you and create a nodecopy for each node in the tree.",
"Start traversing the original tree again and connect the left, right and random pointers in the cloned tree the same way as the original tree with the help of the hashtable."
],
"solution": {
"id": "1083",
"canSeeDetail": false,
"paidOnly": true,
"hasVideoSolution": false,
"paidOnlyVideo": true,
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "[[1,null],null,[4,3],[7,0]]",
"metaData": "{\n \"name\": \"copyRandomBinaryTree\",\n \"params\": [\n {\n \"name\": \"root\",\n \"type\": \"TreeNode\"\n }\n ],\n \"return\": {\n \"type\": \"TreeNode\"\n },\n \"manual\": true,\n \"languages\": [\n \"cpp\",\n \"java\",\n \"python\",\n \"csharp\",\n \"python3\",\n \"javascript\",\n \"typescript\",\n \"kotlin\",\n \"scala\",\n \"swift\",\n \"php\",\n \"ruby\",\n \"golang\"\n ]\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": true,
"envInfo": "{\"cpp\": [\"C++\", \"<p>Compiled with <code> clang 11 </code> using the latest C++ 17 standard.</p>\\r\\n\\r\\n<p>Your code is compiled with level two optimization (<code>-O2</code>). <a href=\\\"https://github.com/google/sanitizers/wiki/AddressSanitizer\\\" target=\\\"_blank\\\">AddressSanitizer</a> is also enabled to help detect out-of-bounds and use-after-free bugs.</p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\"], \"java\": [\"Java\", \"<p><code> OpenJDK 17 </code>. Java 8 features such as lambda expressions and stream API can be used. </p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\\r\\n<p>Includes <code>Pair</code> class from https://docs.oracle.com/javase/8/javafx/api/javafx/util/Pair.html.</p>\"], \"python\": [\"Python\", \"<p><code>Python 2.7.12</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/2/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/2/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/2/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\\r\\n\\r\\n<p>Note that Python 2.7 <a href=\\\"https://www.python.org/dev/peps/pep-0373/\\\" target=\\\"_blank\\\">will not be maintained past 2020</a>. For the latest Python, please choose Python3 instead.</p>\"], \"csharp\": [\"C#\", \"<p><a href=\\\"https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9\\\" target=\\\"_blank\\\">C# 10 with .NET 6 runtime</a></p>\\r\\n\\r\\n<p>Your code is compiled with debug flag enabled (<code>/debug</code>).</p>\"], \"javascript\": [\"JavaScript\", \"<p><code>Node.js 16.13.2</code>.</p>\\r\\n\\r\\n<p>Your code is run with <code>--harmony</code> flag, enabling <a href=\\\"http://node.green/\\\" target=\\\"_blank\\\">new ES6 features</a>.</p>\\r\\n\\r\\n<p><a href=\\\"https://lodash.com\\\" target=\\\"_blank\\\">lodash.js</a> library is included by default.</p>\\r\\n\\r\\n<p>For Priority Queue / Queue data structures, you may use <a href=\\\"https://github.com/datastructures-js/priority-queue\\\" target=\\\"_blank\\\">datastructures-js/priority-queue</a> and <a href=\\\"https://github.com/datastructures-js/queue\\\" target=\\\"_blank\\\">datastructures-js/queue</a>.</p>\"], \"ruby\": [\"Ruby\", \"<p><code>Ruby 3.1</code></p>\\r\\n\\r\\n<p>Some common data structure implementations are provided in the Algorithms module: https://www.rubydoc.info/github/kanwei/algorithms/Algorithms</p>\"], \"swift\": [\"Swift\", \"<p><code>Swift 5.5.2</code>.</p>\"], \"golang\": [\"Go\", \"<p><code>Go 1.17.6</code>.</p>\\r\\n\\r\\n<p>Support <a href=\\\"https://godoc.org/github.com/emirpasic/gods\\\" target=\\\"_blank\\\">https://godoc.org/github.com/emirpasic/gods</a> library.</p>\"], \"python3\": [\"Python3\", \"<p><code>Python 3.10</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/3/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/3/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/3/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\"], \"scala\": [\"Scala\", \"<p><code>Scala 2.13.7</code>.</p>\"], \"kotlin\": [\"Kotlin\", \"<p><code>Kotlin 1.3.10</code>.</p>\"], \"php\": [\"PHP\", \"<p><code>PHP 8.1</code>.</p>\\r\\n<p>With bcmath module</p>\"], \"typescript\": [\"Typescript\", \"<p><code>TypeScript 4.5.4, Node.js 16.13.2</code>.</p>\\r\\n\\r\\n<p>Your code is run with <code>--harmony</code> flag, enabling <a href=\\\"http://node.green/\\\" target=\\\"_blank\\\">new ES2020 features</a>.</p>\\r\\n\\r\\n<p><a href=\\\"https://lodash.com\\\" target=\\\"_blank\\\">lodash.js</a> library is included by default.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,85 @@
{
"data": {
"question": {
"questionId": "1634",
"questionFrontendId": "1490",
"boundTopicId": null,
"title": "Clone N-ary Tree",
"titleSlug": "clone-n-ary-tree",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 304,
"dislikes": 13,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Clone Graph\", \"titleSlug\": \"clone-graph\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Copy List with Random Pointer\", \"titleSlug\": \"copy-list-with-random-pointer\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Clone Binary Tree With Random Pointer\", \"titleSlug\": \"clone-binary-tree-with-random-pointer\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "[1,null,3,2,4,null,5,6]\n[1,null,2,3,4,5,null,null,6,7,null,8,null,9,10,null,null,11,null,12,null,13,null,null,14]",
"categoryTitle": "Algorithms",
"contributors": [],
"topicTags": [
{
"name": "Hash Table",
"slug": "hash-table",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Tree",
"slug": "tree",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Depth-First Search",
"slug": "depth-first-search",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Breadth-First Search",
"slug": "breadth-first-search",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"20.4K\", \"totalSubmission\": \"24.3K\", \"totalAcceptedRaw\": 20384, \"totalSubmissionRaw\": 24335, \"acRate\": \"83.8%\"}",
"hints": [
"Traverse the tree, keep a hashtable with you and create a clone node for each node in the tree.",
"Start traversing the original tree again and connect each child pointer in the cloned tree the same way as the original tree with the help of the hashtable."
],
"solution": {
"id": "1304",
"canSeeDetail": true,
"paidOnly": false,
"hasVideoSolution": false,
"paidOnlyVideo": true,
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "[1,null,3,2,4,null,5,6]",
"metaData": "{\n \"name\": \"cloneTree\",\n \"params\": [\n {\n \"name\": \"root\",\n \"type\": \"integer\"\n }\n ],\n \"return\": {\n \"type\": \"integer\"\n },\n \"manual\": true,\n \"languages\": [\n \"cpp\",\n \"java\",\n \"python\",\n \"python3\",\n \"javascript\",\n \"csharp\",\n \"typescript\",\n \"ruby\",\n \"swift\",\n \"golang\",\n \"scala\",\n \"kotlin\",\n \"php\"\n ]\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": true,
"envInfo": "{\"cpp\": [\"C++\", \"<p>Compiled with <code> clang 11 </code> using the latest C++ 17 standard.</p>\\r\\n\\r\\n<p>Your code is compiled with level two optimization (<code>-O2</code>). <a href=\\\"https://github.com/google/sanitizers/wiki/AddressSanitizer\\\" target=\\\"_blank\\\">AddressSanitizer</a> is also enabled to help detect out-of-bounds and use-after-free bugs.</p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\"], \"java\": [\"Java\", \"<p><code> OpenJDK 17 </code>. Java 8 features such as lambda expressions and stream API can be used. </p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\\r\\n<p>Includes <code>Pair</code> class from https://docs.oracle.com/javase/8/javafx/api/javafx/util/Pair.html.</p>\"], \"python\": [\"Python\", \"<p><code>Python 2.7.12</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/2/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/2/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/2/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\\r\\n\\r\\n<p>Note that Python 2.7 <a href=\\\"https://www.python.org/dev/peps/pep-0373/\\\" target=\\\"_blank\\\">will not be maintained past 2020</a>. For the latest Python, please choose Python3 instead.</p>\"], \"csharp\": [\"C#\", \"<p><a href=\\\"https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9\\\" target=\\\"_blank\\\">C# 10 with .NET 6 runtime</a></p>\\r\\n\\r\\n<p>Your code is compiled with debug flag enabled (<code>/debug</code>).</p>\"], \"javascript\": [\"JavaScript\", \"<p><code>Node.js 16.13.2</code>.</p>\\r\\n\\r\\n<p>Your code is run with <code>--harmony</code> flag, enabling <a href=\\\"http://node.green/\\\" target=\\\"_blank\\\">new ES6 features</a>.</p>\\r\\n\\r\\n<p><a href=\\\"https://lodash.com\\\" target=\\\"_blank\\\">lodash.js</a> library is included by default.</p>\\r\\n\\r\\n<p>For Priority Queue / Queue data structures, you may use <a href=\\\"https://github.com/datastructures-js/priority-queue\\\" target=\\\"_blank\\\">datastructures-js/priority-queue</a> and <a href=\\\"https://github.com/datastructures-js/queue\\\" target=\\\"_blank\\\">datastructures-js/queue</a>.</p>\"], \"ruby\": [\"Ruby\", \"<p><code>Ruby 3.1</code></p>\\r\\n\\r\\n<p>Some common data structure implementations are provided in the Algorithms module: https://www.rubydoc.info/github/kanwei/algorithms/Algorithms</p>\"], \"swift\": [\"Swift\", \"<p><code>Swift 5.5.2</code>.</p>\"], \"golang\": [\"Go\", \"<p><code>Go 1.17.6</code>.</p>\\r\\n\\r\\n<p>Support <a href=\\\"https://godoc.org/github.com/emirpasic/gods\\\" target=\\\"_blank\\\">https://godoc.org/github.com/emirpasic/gods</a> library.</p>\"], \"python3\": [\"Python3\", \"<p><code>Python 3.10</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/3/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/3/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/3/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\"], \"scala\": [\"Scala\", \"<p><code>Scala 2.13.7</code>.</p>\"], \"kotlin\": [\"Kotlin\", \"<p><code>Kotlin 1.3.10</code>.</p>\"], \"php\": [\"PHP\", \"<p><code>PHP 8.1</code>.</p>\\r\\n<p>With bcmath module</p>\"], \"typescript\": [\"Typescript\", \"<p><code>TypeScript 4.5.4, Node.js 16.13.2</code>.</p>\\r\\n\\r\\n<p>Your code is run with <code>--harmony</code> flag, enabling <a href=\\\"http://node.green/\\\" target=\\\"_blank\\\">new ES2020 features</a>.</p>\\r\\n\\r\\n<p><a href=\\\"https://lodash.com\\\" target=\\\"_blank\\\">lodash.js</a> library is included by default.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": {
"id": "860",
"date": "2022-03-01",
"incompleteChallengeCount": 0,
"streakCount": 0,
"type": "WEEKLY",
"__typename": "ChallengeQuestionNode"
},
"__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

View File

@@ -0,0 +1,66 @@
{
"data": {
"question": {
"questionId": "2087",
"questionFrontendId": "1934",
"boundTopicId": null,
"title": "Confirmation Rate",
"titleSlug": "confirmation-rate",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 28,
"dislikes": 9,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\": {\"Signups\": [\"user_id\", \"time_stamp\"], \"Confirmations\": [\"user_id\", \"time_stamp\", \"action\"]}, \"rows\": {\"Signups\": [[3, \"2020-03-21 10:16:13\"], [7, \"2020-01-04 13:57:59\"], [2, \"2020-07-29 23:09:44\"], [6, \"2020-12-09 10:39:37\"]], \"Confirmations\": [[3, \"2021-01-06 03:30:46\", \"timeout\"], [3, \"2021-07-14 14:00:00\", \"timeout\"], [7, \"2021-06-12 11:57:29\", \"confirmed\"], [7, \"2021-06-13 12:58:28\", \"confirmed\"], [7, \"2021-06-14 13:59:27\", \"confirmed\"], [2, \"2021-01-22 00:00:00\", \"confirmed\"], [2, \"2021-02-28 23:59:59\", \"timeout\"]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"5.6K\", \"totalSubmission\": \"7.2K\", \"totalAcceptedRaw\": 5616, \"totalSubmissionRaw\": 7248, \"acRate\": \"77.5%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\": {\"Signups\": [\"user_id\", \"time_stamp\"], \"Confirmations\": [\"user_id\", \"time_stamp\", \"action\"]}, \"rows\": {\"Signups\": [[3, \"2020-03-21 10:16:13\"], [7, \"2020-01-04 13:57:59\"], [2, \"2020-07-29 23:09:44\"], [6, \"2020-12-09 10:39:37\"]], \"Confirmations\": [[3, \"2021-01-06 03:30:46\", \"timeout\"], [3, \"2021-07-14 14:00:00\", \"timeout\"], [7, \"2021-06-12 11:57:29\", \"confirmed\"], [7, \"2021-06-13 12:58:28\", \"confirmed\"], [7, \"2021-06-14 13:59:27\", \"confirmed\"], [2, \"2021-01-22 00:00:00\", \"confirmed\"], [2, \"2021-02-28 23:59:59\", \"timeout\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Signups (user_id int, time_stamp datetime)\",\n \"Create table If Not Exists Confirmations (user_id int, time_stamp datetime, action ENUM('confirmed','timeout'))\"\n ],\n \"mssql\": [\n \"Create table Signups (user_id int, time_stamp datetime)\",\n \"Create table Confirmations (user_id int, time_stamp datetime, action VARCHAR(10) NOT NULL CHECK (action IN ('confirmed','timeout')))\"\n ],\n \"oraclesql\": [\n \"Create table Signups (user_id int, time_stamp date)\",\n \"Create table Confirmations (user_id int, time_stamp date, action VARCHAR(10) NOT NULL CHECK (action IN ('confirmed','timeout')))\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Signups (user_id int, time_stamp datetime)",
"Create table If Not Exists Confirmations (user_id int, time_stamp datetime, action ENUM('confirmed','timeout'))",
"Truncate table Signups",
"insert into Signups (user_id, time_stamp) values ('3', '2020-03-21 10:16:13')",
"insert into Signups (user_id, time_stamp) values ('7', '2020-01-04 13:57:59')",
"insert into Signups (user_id, time_stamp) values ('2', '2020-07-29 23:09:44')",
"insert into Signups (user_id, time_stamp) values ('6', '2020-12-09 10:39:37')",
"Truncate table Confirmations",
"insert into Confirmations (user_id, time_stamp, action) values ('3', '2021-01-06 03:30:46', 'timeout')",
"insert into Confirmations (user_id, time_stamp, action) values ('3', '2021-07-14 14:00:00', 'timeout')",
"insert into Confirmations (user_id, time_stamp, action) values ('7', '2021-06-12 11:57:29', 'confirmed')",
"insert into Confirmations (user_id, time_stamp, action) values ('7', '2021-06-13 12:58:28', 'confirmed')",
"insert into Confirmations (user_id, time_stamp, action) values ('7', '2021-06-14 13:59:27', 'confirmed')",
"insert into Confirmations (user_id, time_stamp, action) values ('2', '2021-01-22 00:00:00', 'confirmed')",
"insert into Confirmations (user_id, time_stamp, action) values ('2', '2021-02-28 23:59:59', 'timeout')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__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

View File

@@ -0,0 +1,65 @@
{
"data": {
"question": {
"questionId": "603",
"questionFrontendId": "603",
"boundTopicId": null,
"title": "Consecutive Available Seats",
"titleSlug": "consecutive-available-seats",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 449,
"dislikes": 40,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Cinema\":[\"seat_id\",\"free\"]},\"rows\":{\"Cinema\":[[1,1],[2,0],[3,1],[4,1],[5,1]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"53.2K\", \"totalSubmission\": \"78.5K\", \"totalAcceptedRaw\": 53210, \"totalSubmissionRaw\": 78491, \"acRate\": \"67.8%\"}",
"hints": [],
"solution": {
"id": "168",
"canSeeDetail": true,
"paidOnly": false,
"hasVideoSolution": false,
"paidOnlyVideo": true,
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "{\"headers\":{\"Cinema\":[\"seat_id\",\"free\"]},\"rows\":{\"Cinema\":[[1,1],[2,0],[3,1],[4,1],[5,1]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Cinema (seat_id int primary key auto_increment, free bool)\"\n ],\n \"mssql\": [\n \"Create table Cinema (seat_id int primary key, free BIT)\"\n ],\n \"oraclesql\": [\n \"Create table Cinema (seat_id int primary key, free NUMBER(1))\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Cinema (seat_id int primary key auto_increment, free bool)",
"Truncate table Cinema",
"insert into Cinema (seat_id, free) values ('1', '1')",
"insert into Cinema (seat_id, free) values ('2', '0')",
"insert into Cinema (seat_id, free) values ('3', '1')",
"insert into Cinema (seat_id, free) values ('4', '1')",
"insert into Cinema (seat_id, free) values ('5', '1')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,56 @@
{
"data": {
"question": {
"questionId": "2004",
"questionFrontendId": "1853",
"boundTopicId": null,
"title": "Convert Date Format",
"titleSlug": "convert-date-format",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 27,
"dislikes": 27,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Days\":[\"day\"]},\"rows\":{\"Days\":[[\"2022-04-12\"],[\"2021-08-09\"],[\"2020-06-26\"]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"6.3K\", \"totalSubmission\": \"7.2K\", \"totalAcceptedRaw\": 6288, \"totalSubmissionRaw\": 7168, \"acRate\": \"87.7%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Days\":[\"day\"]},\"rows\":{\"Days\":[[\"2022-04-12\"],[\"2021-08-09\"],[\"2020-06-26\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Days (day date)\"\n ],\n \"mssql\": [\n \"Create table Days (day date)\"\n ],\n \"oraclesql\": [\n \"Create table Days (day date)\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Days (day date)",
"Truncate table Days",
"insert into Days (day) values ('2022-04-12')",
"insert into Days (day) values ('2021-08-09')",
"insert into Days (day) values ('2020-06-26')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,76 @@
{
"data": {
"question": {
"questionId": "1796",
"questionFrontendId": "1660",
"boundTopicId": null,
"title": "Correct a Binary Tree",
"titleSlug": "correct-a-binary-tree",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 159,
"dislikes": 22,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Flatten Binary Tree to Linked List\", \"titleSlug\": \"flatten-binary-tree-to-linked-list\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Flatten a Multilevel Doubly Linked List\", \"titleSlug\": \"flatten-a-multilevel-doubly-linked-list\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "[1,2,3]\n2\n3\n[8,3,1,7,null,9,4,2,null,null,null,5,6]\n7\n4",
"categoryTitle": "Algorithms",
"contributors": [],
"topicTags": [
{
"name": "Hash Table",
"slug": "hash-table",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Tree",
"slug": "tree",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Depth-First Search",
"slug": "depth-first-search",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Breadth-First Search",
"slug": "breadth-first-search",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Binary Tree",
"slug": "binary-tree",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"10.2K\", \"totalSubmission\": \"14K\", \"totalAcceptedRaw\": 10154, \"totalSubmissionRaw\": 13969, \"acRate\": \"72.7%\"}",
"hints": [
"If you traverse the tree from right to left, the invalid node will point to a node that has already been visited."
],
"solution": null,
"status": null,
"sampleTestCase": "[1,2,3]\n2\n3",
"metaData": "{\n \"name\": \"correctBinaryTree\",\n \"params\": [\n {\n \"name\": \"root\",\n \"type\": \"TreeNode\"\n },\n {\n \"type\": \"integer\",\n \"name\": \"fromNode\"\n },\n {\n \"type\": \"integer\",\n \"name\": \"toNode\"\n }\n ],\n \"return\": {\n \"type\": \"TreeNode\"\n },\n \"manual\": true,\n \"languages\": [\n \"cpp\",\n \"java\",\n \"python\",\n \"csharp\",\n \"javascript\",\n \"python3\"\n ]\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": true,
"envInfo": "{\"cpp\": [\"C++\", \"<p>Compiled with <code> clang 11 </code> using the latest C++ 17 standard.</p>\\r\\n\\r\\n<p>Your code is compiled with level two optimization (<code>-O2</code>). <a href=\\\"https://github.com/google/sanitizers/wiki/AddressSanitizer\\\" target=\\\"_blank\\\">AddressSanitizer</a> is also enabled to help detect out-of-bounds and use-after-free bugs.</p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\"], \"java\": [\"Java\", \"<p><code> OpenJDK 17 </code>. Java 8 features such as lambda expressions and stream API can be used. </p>\\r\\n\\r\\n<p>Most standard library headers are already included automatically for your convenience.</p>\\r\\n<p>Includes <code>Pair</code> class from https://docs.oracle.com/javase/8/javafx/api/javafx/util/Pair.html.</p>\"], \"python\": [\"Python\", \"<p><code>Python 2.7.12</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/2/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/2/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/2/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\\r\\n\\r\\n<p>Note that Python 2.7 <a href=\\\"https://www.python.org/dev/peps/pep-0373/\\\" target=\\\"_blank\\\">will not be maintained past 2020</a>. For the latest Python, please choose Python3 instead.</p>\"], \"csharp\": [\"C#\", \"<p><a href=\\\"https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9\\\" target=\\\"_blank\\\">C# 10 with .NET 6 runtime</a></p>\\r\\n\\r\\n<p>Your code is compiled with debug flag enabled (<code>/debug</code>).</p>\"], \"javascript\": [\"JavaScript\", \"<p><code>Node.js 16.13.2</code>.</p>\\r\\n\\r\\n<p>Your code is run with <code>--harmony</code> flag, enabling <a href=\\\"http://node.green/\\\" target=\\\"_blank\\\">new ES6 features</a>.</p>\\r\\n\\r\\n<p><a href=\\\"https://lodash.com\\\" target=\\\"_blank\\\">lodash.js</a> library is included by default.</p>\\r\\n\\r\\n<p>For Priority Queue / Queue data structures, you may use <a href=\\\"https://github.com/datastructures-js/priority-queue\\\" target=\\\"_blank\\\">datastructures-js/priority-queue</a> and <a href=\\\"https://github.com/datastructures-js/queue\\\" target=\\\"_blank\\\">datastructures-js/queue</a>.</p>\"], \"python3\": [\"Python3\", \"<p><code>Python 3.10</code>.</p>\\r\\n\\r\\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\\\"https://docs.python.org/3/library/array.html\\\" target=\\\"_blank\\\">array</a>, <a href=\\\"https://docs.python.org/3/library/bisect.html\\\" target=\\\"_blank\\\">bisect</a>, <a href=\\\"https://docs.python.org/3/library/collections.html\\\" target=\\\"_blank\\\">collections</a>. If you need more libraries, you can import it yourself.</p>\\r\\n\\r\\n<p>For Map/TreeMap data structure, you may use <a href=\\\"http://www.grantjenks.com/docs/sortedcontainers/\\\" target=\\\"_blank\\\">sortedcontainers</a> library.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,67 @@
{
"data": {
"question": {
"questionId": "1862",
"questionFrontendId": "1715",
"boundTopicId": null,
"title": "Count Apples and Oranges",
"titleSlug": "count-apples-and-oranges",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 48,
"dislikes": 7,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Boxes\":[\"box_id\",\"chest_id\",\"apple_count\",\"orange_count\"],\"Chests\":[\"chest_id\",\"apple_count\",\"orange_count\"]},\"rows\":{\"Boxes\":[[2,null,6,15],[18,14,4,15],[19,3,8,4],[12,2,19,20],[20,6,12,9],[8,6,9,9],[3,14,16,7]],\"Chests\":[[6,5,6],[14,20,10],[2,8,8],[3,19,4],[16,19,19]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"8.1K\", \"totalSubmission\": \"10.4K\", \"totalAcceptedRaw\": 8078, \"totalSubmissionRaw\": 10352, \"acRate\": \"78.0%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Boxes\":[\"box_id\",\"chest_id\",\"apple_count\",\"orange_count\"],\"Chests\":[\"chest_id\",\"apple_count\",\"orange_count\"]},\"rows\":{\"Boxes\":[[2,null,6,15],[18,14,4,15],[19,3,8,4],[12,2,19,20],[20,6,12,9],[8,6,9,9],[3,14,16,7]],\"Chests\":[[6,5,6],[14,20,10],[2,8,8],[3,19,4],[16,19,19]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Boxes (box_id int, chest_id int, apple_count int, orange_count int)\",\n \"Create table If Not Exists Chests (chest_id int, apple_count int, orange_count int)\"\n ],\n \"mssql\": [\n \"Create table Boxes (box_id int, chest_id int, apple_count int, orange_count int)\",\n \"Create table Chests (chest_id int, apple_count int, orange_count int)\"\n ],\n \"oraclesql\": [\n \"Create table Boxes (box_id int, chest_id int, apple_count int, orange_count int)\",\n \"Create table Chests (chest_id int, apple_count int, orange_count int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Boxes (box_id int, chest_id int, apple_count int, orange_count int)",
"Create table If Not Exists Chests (chest_id int, apple_count int, orange_count int)",
"Truncate table Boxes",
"insert into Boxes (box_id, chest_id, apple_count, orange_count) values ('2', 'None', '6', '15')",
"insert into Boxes (box_id, chest_id, apple_count, orange_count) values ('18', '14', '4', '15')",
"insert into Boxes (box_id, chest_id, apple_count, orange_count) values ('19', '3', '8', '4')",
"insert into Boxes (box_id, chest_id, apple_count, orange_count) values ('12', '2', '19', '20')",
"insert into Boxes (box_id, chest_id, apple_count, orange_count) values ('20', '6', '12', '9')",
"insert into Boxes (box_id, chest_id, apple_count, orange_count) values ('8', '6', '9', '9')",
"insert into Boxes (box_id, chest_id, apple_count, orange_count) values ('3', '14', '16', '7')",
"Truncate table Chests",
"insert into Chests (chest_id, apple_count, orange_count) values ('6', '5', '6')",
"insert into Chests (chest_id, apple_count, orange_count) values ('14', '20', '10')",
"insert into Chests (chest_id, apple_count, orange_count) values ('2', '8', '8')",
"insert into Chests (chest_id, apple_count, orange_count) values ('3', '19', '4')",
"insert into Chests (chest_id, apple_count, orange_count) values ('16', '19', '19')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__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

View File

@@ -0,0 +1,57 @@
{
"data": {
"question": {
"questionId": "2057",
"questionFrontendId": "1907",
"boundTopicId": null,
"title": "Count Salary Categories",
"titleSlug": "count-salary-categories",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 30,
"dislikes": 13,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Create a Session Bar Chart\", \"titleSlug\": \"create-a-session-bar-chart\", \"difficulty\": \"Easy\", \"translatedTitle\": null}]",
"exampleTestcases": "{\"headers\":{\"Accounts\":[\"account_id\",\"income\"]},\"rows\":{\"Accounts\":[[3,108939],[2,12747],[8,87709],[6,91796]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"4.7K\", \"totalSubmission\": \"7K\", \"totalAcceptedRaw\": 4698, \"totalSubmissionRaw\": 7040, \"acRate\": \"66.7%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Accounts\":[\"account_id\",\"income\"]},\"rows\":{\"Accounts\":[[3,108939],[2,12747],[8,87709],[6,91796]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Accounts (account_id int, income int)\"\n ],\n \"mssql\": [\n \"Create table Accounts (account_id int, income int)\"\n ],\n \"oraclesql\": [\n \"Create table Accounts (account_id int, income int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Accounts (account_id int, income int)",
"Truncate table Accounts",
"insert into Accounts (account_id, income) values ('3', '108939')",
"insert into Accounts (account_id, income) values ('2', '12747')",
"insert into Accounts (account_id, income) values ('8', '87709')",
"insert into Accounts (account_id, income) values ('6', '91796')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,71 @@
{
"data": {
"question": {
"questionId": "580",
"questionFrontendId": "580",
"boundTopicId": null,
"title": "Count Student Number in Departments",
"titleSlug": "count-student-number-in-departments",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 180,
"dislikes": 30,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Student\":[\"student_id\",\"student_name\",\"gender\",\"dept_id\"],\"Department\":[\"dept_id\",\"dept_name\"]},\"rows\":{\"Student\":[[1,\"Jack\",\"M\",1],[2,\"Jane\",\"F\",1],[3,\"Mark\",\"M\",2]],\"Department\":[[1,\"Engineering\"],[2,\"Science\"],[3,\"Law\"]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"42.8K\", \"totalSubmission\": \"76.1K\", \"totalAcceptedRaw\": 42828, \"totalSubmissionRaw\": 76062, \"acRate\": \"56.3%\"}",
"hints": [
"Still remember the difference between 'INNER JOIN' and 'OUTTER JOIN' in SQL?",
"Do you know other expressions using the 'COUNT' function besides 'COUNT(*)'?"
],
"solution": {
"id": "159",
"canSeeDetail": true,
"paidOnly": false,
"hasVideoSolution": false,
"paidOnlyVideo": true,
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "{\"headers\":{\"Student\":[\"student_id\",\"student_name\",\"gender\",\"dept_id\"],\"Department\":[\"dept_id\",\"dept_name\"]},\"rows\":{\"Student\":[[1,\"Jack\",\"M\",1],[2,\"Jane\",\"F\",1],[3,\"Mark\",\"M\",2]],\"Department\":[[1,\"Engineering\"],[2,\"Science\"],[3,\"Law\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Student (student_id int,student_name varchar(45), gender varchar(6), dept_id int)\",\n \"Create table If Not Exists Department (dept_id int, dept_name varchar(255))\"\n ],\n \"mssql\": [\n \"Create table Student (student_id int,student_name varchar(45), gender varchar(6), dept_id int)\",\n \"Create table Department (dept_id int, dept_name varchar(255))\"\n ],\n \"oraclesql\": [\n \"Create table Student (student_id int,student_name varchar(45), gender varchar(6), dept_id int)\",\n \"Create table Department (dept_id int, dept_name varchar(255))\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Student (student_id int,student_name varchar(45), gender varchar(6), dept_id int)",
"Create table If Not Exists Department (dept_id int, dept_name varchar(255))",
"Truncate table Student",
"insert into Student (student_id, student_name, gender, dept_id) values ('1', 'Jack', 'M', '1')",
"insert into Student (student_id, student_name, gender, dept_id) values ('2', 'Jane', 'F', '1')",
"insert into Student (student_id, student_name, gender, dept_id) values ('3', 'Mark', 'M', '2')",
"Truncate table Department",
"insert into Department (dept_id, dept_name) values ('1', 'Engineering')",
"insert into Department (dept_id, dept_name) values ('2', 'Science')",
"insert into Department (dept_id, dept_name) values ('3', 'Law')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,59 @@
{
"data": {
"question": {
"questionId": "2143",
"questionFrontendId": "1990",
"boundTopicId": null,
"title": "Count the Number of Experiments",
"titleSlug": "count-the-number-of-experiments",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 7,
"dislikes": 77,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Experiments\":[\"experiment_id\",\"platform\",\"experiment_name\"]},\"rows\":{\"Experiments\":[[4,\"IOS\",\"Programming\"],[13,\"IOS\",\"Sports\"],[14,\"Android\",\"Reading\"],[8,\"Web\",\"Reading\"],[12,\"Web\",\"Reading\"],[18,\"Web\",\"Programming\"]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"2.3K\", \"totalSubmission\": \"4.5K\", \"totalAcceptedRaw\": 2278, \"totalSubmissionRaw\": 4514, \"acRate\": \"50.5%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Experiments\":[\"experiment_id\",\"platform\",\"experiment_name\"]},\"rows\":{\"Experiments\":[[4,\"IOS\",\"Programming\"],[13,\"IOS\",\"Sports\"],[14,\"Android\",\"Reading\"],[8,\"Web\",\"Reading\"],[12,\"Web\",\"Reading\"],[18,\"Web\",\"Programming\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Experiments (experiment_id int, platform ENUM('Android', 'IOS', 'Web'), experiment_name ENUM('Reading', 'Sports', 'Programming'))\"\n ],\n \"mssql\": [\n \"Create table Experiments (experiment_id int, platform VARCHAR(7) NOT NULL CHECK (platform IN ('Android', 'IOS', 'Web')), experiment_name VARCHAR(11) NOT NULL CHECK (experiment_name IN ('Reading', 'Sports', 'Programming')))\"\n ],\n \"oraclesql\": [\n \"Create table Experiments (experiment_id int, platform VARCHAR(7) NOT NULL CHECK (platform IN ('Android', 'IOS', 'Web')), experiment_name VARCHAR(11) NOT NULL CHECK (experiment_name IN ('Reading', 'Sports', 'Programming')))\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Experiments (experiment_id int, platform ENUM('Android', 'IOS', 'Web'), experiment_name ENUM('Reading', 'Sports', 'Programming'))",
"Truncate table Experiments",
"insert into Experiments (experiment_id, platform, experiment_name) values ('4', 'IOS', 'Programming')",
"insert into Experiments (experiment_id, platform, experiment_name) values ('13', 'IOS', 'Sports')",
"insert into Experiments (experiment_id, platform, experiment_name) values ('14', 'Android', 'Reading')",
"insert into Experiments (experiment_id, platform, experiment_name) values ('8', 'Web', 'Reading')",
"insert into Experiments (experiment_id, platform, experiment_name) values ('12', 'Web', 'Reading')",
"insert into Experiments (experiment_id, platform, experiment_name) values ('18', 'Web', 'Programming')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__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

View File

@@ -0,0 +1,78 @@
{
"data": {
"question": {
"questionId": "1641",
"questionFrontendId": "1501",
"boundTopicId": null,
"title": "Countries You Can Safely Invest In",
"titleSlug": "countries-you-can-safely-invest-in",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 151,
"dislikes": 19,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Average Salary: Departments VS Company\", \"titleSlug\": \"average-salary-departments-vs-company\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]",
"exampleTestcases": "{\"headers\":{\"Person\":[\"id\",\"name\",\"phone_number\"],\"Country\":[\"name\",\"country_code\"],\"Calls\":[\"caller_id\",\"callee_id\",\"duration\"]},\"rows\":{\"Person\":[[3,\"Jonathan\",\"051-1234567\"],[12,\"Elvis\",\"051-7654321\"],[1,\"Moncef\",\"212-1234567\"],[2,\"Maroua\",\"212-6523651\"],[7,\"Meir\",\"972-1234567\"],[9,\"Rachel\",\"972-0011100\"]],\"Country\":[[\"Peru\",\"051\"],[\"Israel\",\"972\"],[\"Morocco\",\"212\"],[\"Germany\",\"049\"],[\"Ethiopia\",\"251\"]],\"Calls\":[[1,9,33],[2,9,4],[1,2,59],[3,12,102],[3,12,330],[12,3,5],[7,9,13],[7,1,3],[9,7,1],[1,7,7]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"15.3K\", \"totalSubmission\": \"26.4K\", \"totalAcceptedRaw\": 15345, \"totalSubmissionRaw\": 26423, \"acRate\": \"58.1%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Person\":[\"id\",\"name\",\"phone_number\"],\"Country\":[\"name\",\"country_code\"],\"Calls\":[\"caller_id\",\"callee_id\",\"duration\"]},\"rows\":{\"Person\":[[3,\"Jonathan\",\"051-1234567\"],[12,\"Elvis\",\"051-7654321\"],[1,\"Moncef\",\"212-1234567\"],[2,\"Maroua\",\"212-6523651\"],[7,\"Meir\",\"972-1234567\"],[9,\"Rachel\",\"972-0011100\"]],\"Country\":[[\"Peru\",\"051\"],[\"Israel\",\"972\"],[\"Morocco\",\"212\"],[\"Germany\",\"049\"],[\"Ethiopia\",\"251\"]],\"Calls\":[[1,9,33],[2,9,4],[1,2,59],[3,12,102],[3,12,330],[12,3,5],[7,9,13],[7,1,3],[9,7,1],[1,7,7]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Person (id int, name varchar(15), phone_number varchar(11))\",\n \"Create table If Not Exists Country (name varchar(15), country_code varchar(3))\",\n \"Create table If Not Exists Calls (caller_id int, callee_id int, duration int)\"\n ],\n \"mssql\": [\n \"Create table Person (id int, name varchar(15), phone_number varchar(11))\",\n \"Create table Country (name varchar(15), country_code varchar(3))\",\n \"Create table Calls (caller_id int, callee_id int, duration int)\"\n ],\n \"oraclesql\": [\n \"Create table Person (id int, name varchar(15), phone_number varchar(11))\",\n \"Create table Country (name varchar(15), country_code varchar(3))\",\n \"Create table Calls (caller_id int, callee_id int, duration int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Person (id int, name varchar(15), phone_number varchar(11))",
"Create table If Not Exists Country (name varchar(15), country_code varchar(3))",
"Create table If Not Exists Calls (caller_id int, callee_id int, duration int)",
"Truncate table Person",
"insert into Person (id, name, phone_number) values ('3', 'Jonathan', '051-1234567')",
"insert into Person (id, name, phone_number) values ('12', 'Elvis', '051-7654321')",
"insert into Person (id, name, phone_number) values ('1', 'Moncef', '212-1234567')",
"insert into Person (id, name, phone_number) values ('2', 'Maroua', '212-6523651')",
"insert into Person (id, name, phone_number) values ('7', 'Meir', '972-1234567')",
"insert into Person (id, name, phone_number) values ('9', 'Rachel', '972-0011100')",
"Truncate table Country",
"insert into Country (name, country_code) values ('Peru', '051')",
"insert into Country (name, country_code) values ('Israel', '972')",
"insert into Country (name, country_code) values ('Morocco', '212')",
"insert into Country (name, country_code) values ('Germany', '049')",
"insert into Country (name, country_code) values ('Ethiopia', '251')",
"Truncate table Calls",
"insert into Calls (caller_id, callee_id, duration) values ('1', '9', '33')",
"insert into Calls (caller_id, callee_id, duration) values ('2', '9', '4')",
"insert into Calls (caller_id, callee_id, duration) values ('1', '2', '59')",
"insert into Calls (caller_id, callee_id, duration) values ('3', '12', '102')",
"insert into Calls (caller_id, callee_id, duration) values ('3', '12', '330')",
"insert into Calls (caller_id, callee_id, duration) values ('12', '3', '5')",
"insert into Calls (caller_id, callee_id, duration) values ('7', '9', '13')",
"insert into Calls (caller_id, callee_id, duration) values ('7', '1', '3')",
"insert into Calls (caller_id, callee_id, duration) values ('9', '7', '1')",
"insert into Calls (caller_id, callee_id, duration) values ('1', '7', '7')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,58 @@
{
"data": {
"question": {
"questionId": "1564",
"questionFrontendId": "1435",
"boundTopicId": null,
"title": "Create a Session Bar Chart",
"titleSlug": "create-a-session-bar-chart",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 107,
"dislikes": 188,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Count Salary Categories\", \"titleSlug\": \"count-salary-categories\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "{\"headers\": {\"Sessions\": [\"session_id\", \"duration\"]}, \"rows\": {\"Sessions\": [[1, 30], [2, 199], [3, 299], [4, 580], [5, 1000]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"15.3K\", \"totalSubmission\": \"19.6K\", \"totalAcceptedRaw\": 15346, \"totalSubmissionRaw\": 19589, \"acRate\": \"78.3%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\": {\"Sessions\": [\"session_id\", \"duration\"]}, \"rows\": {\"Sessions\": [[1, 30], [2, 199], [3, 299], [4, 580], [5, 1000]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Sessions (session_id int, duration int)\"\n ],\n \"mssql\": [\n \"Create table Sessions (session_id int, duration int)\"\n ],\n \"oraclesql\": [\n \"Create table Sessions (session_id int, duration int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Sessions (session_id int, duration int)",
"Truncate table Sessions",
"insert into Sessions (session_id, duration) values ('1', '30')",
"insert into Sessions (session_id, duration) values ('2', '199')",
"insert into Sessions (session_id, duration) values ('3', '299')",
"insert into Sessions (session_id, duration) values ('4', '580')",
"insert into Sessions (session_id, duration) values ('5', '1000')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,72 @@
{
"data": {
"question": {
"questionId": "1654",
"questionFrontendId": "1511",
"boundTopicId": null,
"title": "Customer Order Frequency",
"titleSlug": "customer-order-frequency",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 217,
"dislikes": 43,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\": {\"Customers\": [\"customer_id\", \"name\", \"country\"], \"Product\": [\"product_id\", \"description\", \"price\"], \"Orders\": [\"order_id\", \"customer_id\", \"product_id\", \"order_date\", \"quantity\"]}, \"rows\": {\"Customers\": [[1, \"Winston\", \"USA\"], [2, \"Jonathan\", \"Peru\"], [3, \"Moustafa\", \"Egypt\"]], \"Product\": [[10, \"LC Phone\", 300], [20, \"LC T-Shirt\", 10], [30, \"LC Book\", 45], [40, \"LC Keychain\", 2]], \"Orders\": [[1, 1, 10, \"2020-06-10\", 1], [2, 1, 20, \"2020-07-01\", 1], [3, 1, 30, \"2020-07-08\", 2], [4, 2, 10, \"2020-06-15\", 2], [5, 2, 40, \"2020-07-01\", 10], [6, 3, 20, \"2020-06-24\", 2], [7, 3, 30, \"2020-06-25\", 2], [9, 3, 30, \"2020-05-08\", 3]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"26.4K\", \"totalSubmission\": \"35.9K\", \"totalAcceptedRaw\": 26382, \"totalSubmissionRaw\": 35901, \"acRate\": \"73.5%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\": {\"Customers\": [\"customer_id\", \"name\", \"country\"], \"Product\": [\"product_id\", \"description\", \"price\"], \"Orders\": [\"order_id\", \"customer_id\", \"product_id\", \"order_date\", \"quantity\"]}, \"rows\": {\"Customers\": [[1, \"Winston\", \"USA\"], [2, \"Jonathan\", \"Peru\"], [3, \"Moustafa\", \"Egypt\"]], \"Product\": [[10, \"LC Phone\", 300], [20, \"LC T-Shirt\", 10], [30, \"LC Book\", 45], [40, \"LC Keychain\", 2]], \"Orders\": [[1, 1, 10, \"2020-06-10\", 1], [2, 1, 20, \"2020-07-01\", 1], [3, 1, 30, \"2020-07-08\", 2], [4, 2, 10, \"2020-06-15\", 2], [5, 2, 40, \"2020-07-01\", 10], [6, 3, 20, \"2020-06-24\", 2], [7, 3, 30, \"2020-06-25\", 2], [9, 3, 30, \"2020-05-08\", 3]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Customers (customer_id int, name varchar(30), country varchar(30))\",\n \"Create table If Not Exists Product (product_id int, description varchar(30), price int)\\n\",\n \"Create table If Not Exists Orders (order_id int, customer_id int, product_id int, order_date date, quantity int)\\n\"\n ],\n \"mssql\": [\n \"Create table Customers (customer_id int, name varchar(30), country varchar(30))\\n\",\n \"Create table Product (product_id int, description varchar(30), price int)\",\n \"Create table Orders (order_id int, customer_id int, product_id int, order_date date, quantity int)\"\n ],\n \"oraclesql\": [\n \"Create table Customers (customer_id int, name varchar(30), country varchar(30))\",\n \"Create table Product (product_id int, description varchar(30), price int)\",\n \"Create table Orders (order_id int, customer_id int, product_id int, order_date date, quantity int)\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Customers (customer_id int, name varchar(30), country varchar(30))",
"Create table If Not Exists Product (product_id int, description varchar(30), price int)\n",
"Create table If Not Exists Orders (order_id int, customer_id int, product_id int, order_date date, quantity int)\n",
"Truncate table Customers",
"insert into Customers (customer_id, name, country) values ('1', 'Winston', 'USA')",
"insert into Customers (customer_id, name, country) values ('2', 'Jonathan', 'Peru')",
"insert into Customers (customer_id, name, country) values ('3', 'Moustafa', 'Egypt')",
"Truncate table Product",
"insert into Product (product_id, description, price) values ('10', 'LC Phone', '300')",
"insert into Product (product_id, description, price) values ('20', 'LC T-Shirt', '10')",
"insert into Product (product_id, description, price) values ('30', 'LC Book', '45')",
"insert into Product (product_id, description, price) values ('40', 'LC Keychain', '2')",
"Truncate table Orders",
"insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('1', '1', '10', '2020-06-10', '1')",
"insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('2', '1', '20', '2020-07-01', '1')",
"insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('3', '1', '30', '2020-07-08', '2')",
"insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('4', '2', '10', '2020-06-15', '2')",
"insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('5', '2', '40', '2020-07-01', '10')",
"insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('6', '3', '20', '2020-06-24', '2')",
"insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('7', '3', '30', '2020-06-25', '2')",
"insert into Orders (order_id, customer_id, product_id, order_date, quantity) values ('9', '3', '30', '2020-05-08', '3')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,62 @@
{
"data": {
"question": {
"questionId": "1135",
"questionFrontendId": "1045",
"boundTopicId": null,
"title": "Customers Who Bought All Products",
"titleSlug": "customers-who-bought-all-products",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 171,
"dislikes": 35,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\":{\"Customer\":[\"customer_id\",\"product_key\"],\"Product\":[\"product_key\"]},\"rows\":{\"Customer\":[[1,5],[2,6],[3,5],[3,6],[1,6]],\"Product\":[[5],[6]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"34.9K\", \"totalSubmission\": \"51.8K\", \"totalAcceptedRaw\": 34877, \"totalSubmissionRaw\": 51822, \"acRate\": \"67.3%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Customer\":[\"customer_id\",\"product_key\"],\"Product\":[\"product_key\"]},\"rows\":{\"Customer\":[[1,5],[2,6],[3,5],[3,6],[1,6]],\"Product\":[[5],[6]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Customer (customer_id int, product_key int)\",\n \"Create table Product (product_key int)\"\n ],\n \"mssql\": [\n \"Create table Customer (customer_id int, product_key int)\",\n \"Create table Product (product_key int)\"\n ],\n \"oraclesql\": [\n \"Create table Customer (customer_id int, product_key int)\",\n \"Create table Product (product_key int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Customer (customer_id int, product_key int)",
"Create table Product (product_key int)",
"Truncate table Customer",
"insert into Customer (customer_id, product_key) values ('1', '5')",
"insert into Customer (customer_id, product_key) values ('2', '6')",
"insert into Customer (customer_id, product_key) values ('3', '5')",
"insert into Customer (customer_id, product_key) values ('3', '6')",
"insert into Customer (customer_id, product_key) values ('1', '6')",
"Truncate table Product",
"insert into Product (product_key) values ('5')",
"insert into Product (product_key) values ('6')"
],
"enableRunCode": true,
"enableTestMode": false,
"enableDebugger": false,
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
"libraryUrl": null,
"adminUrl": null,
"challengeQuestion": null,
"__typename": "QuestionNode"
}
}
}

Some files were not shown because too many files have changed in this diff Show More