mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
add scripts and problemset
This commit is contained in:
parent
e632b8e00c
commit
adb80564bd
130
1.py
Normal file
130
1.py
Normal file
@ -0,0 +1,130 @@
|
||||
# coding:utf-8
|
||||
import re
|
||||
import json
|
||||
import os
|
||||
import threading
|
||||
import time
|
||||
import requests
|
||||
from requests.exceptions import RequestException
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
import random
|
||||
|
||||
def get_proble_set(url):
|
||||
try:
|
||||
response = requests.get(url)
|
||||
if response.status_code == 200:
|
||||
return response.text
|
||||
return None
|
||||
except RequestException:
|
||||
return None
|
||||
|
||||
def parse_proble_set(problemSet):
|
||||
# print(len(problemSet)) # 2218
|
||||
# for i in range(len(problemSet)):
|
||||
for i in range(930, len(problemSet)):
|
||||
title = problemSet[i]["stat"]["question__title_slug"]
|
||||
if os.path.exists("[no content]{}.json".format(title)) or os.path.exists("{}.json".format(title)):
|
||||
print(i, "has been parsed.")
|
||||
# print("The question has been parsed: {}".format(title))
|
||||
continue
|
||||
#construct_url(title)
|
||||
# time.sleep(0.5)
|
||||
time.sleep(1)
|
||||
# time.sleep(random.randint(0,9) / 10)
|
||||
t =threading.Thread(target=construct_url,args=(title,))
|
||||
t.start()
|
||||
|
||||
print(i, "is done.")
|
||||
continue
|
||||
|
||||
def construct_url(problemTitle):
|
||||
url = "https://leetcode.com/problems/"+ problemTitle + "/description/"
|
||||
# print(url)
|
||||
get_proble_content(url,problemTitle)
|
||||
|
||||
def save_problem(title,content):
|
||||
#content = bytes(content,encoding = 'utf8')
|
||||
filename = title + ".html"
|
||||
with open(filename,'w+',encoding="utf-8")as f:
|
||||
f.write(content)
|
||||
|
||||
def get_proble_content(problemUrl,title):
|
||||
response = requests.get(problemUrl)
|
||||
setCookie = response.headers["Set-Cookie"]
|
||||
'''
|
||||
print(setCookie)
|
||||
setCookie = json.loads(setCookie)
|
||||
print(type(setCookie))
|
||||
'''
|
||||
try:
|
||||
pattern = re.compile("csrftoken=(.*?);.*?",re.S)
|
||||
csrftoken = re.search(pattern, setCookie)
|
||||
url = "https://leetcode.com/graphql"
|
||||
data = {
|
||||
#"operationName":"getQuestionDetail",
|
||||
"operationName":"questionData",
|
||||
"variables":{"titleSlug":title},
|
||||
# "query":"query getQuestionDetail($titleSlug: String!) {\n isCurrentUserAuthenticated\n question(titleSlug: $titleSlug) {\n questionId\n questionFrontendId\n questionTitle\n translatedTitle\n questionTitleSlug\n content\n translatedContent\n difficulty\n stats\n allowDiscuss\n contributors\n similarQuestions\n mysqlSchemas\n randomQuestionUrl\n sessionId\n categoryTitle\n submitUrl\n interpretUrl\n codeDefinition\n sampleTestCase\n enableTestMode\n metaData\n enableRunCode\n enableSubmit\n judgerAvailable\n infoVerified\n envInfo\n urlManager\n article\n questionDetailUrl\n libraryUrl\n companyTags {\n name\n slug\n translatedName\n __typename\n }\n companyTagStats\n topicTags {\n name\n slug\n translatedName\n __typename\n }\n __typename\n }\n interviewed {\n interviewedUrl\n companies {\n id\n name\n slug\n __typename\n }\n timeOptions {\n id\n name\n __typename\n }\n stageOptions {\n id\n name\n __typename\n }\n __typename\n }\n subscribeUrl\n isPremium\n loginUrl\n}\n"
|
||||
"query": "query questionData($titleSlug: String!) {\n question(titleSlug: $titleSlug) {\n questionId\n questionFrontendId\n boundTopicId\n title\n titleSlug\n content\n translatedTitle\n translatedContent\n isPaidOnly\n difficulty\n likes\n dislikes\n isLiked\n similarQuestions\n exampleTestcases\n categoryTitle\n contributors {\n username\n profileUrl\n avatarUrl\n __typename\n }\n topicTags {\n name\n slug\n translatedName\n __typename\n }\n companyTagStats\n codeSnippets {\n lang\n langSlug\n code\n __typename\n }\n stats\n hints\n solution {\n id\n canSeeDetail\n paidOnly\n hasVideoSolution\n paidOnlyVideo\n __typename\n }\n status\n sampleTestCase\n metaData\n judgerAvailable\n judgeType\n mysqlSchemas\n enableRunCode\n enableTestMode\n enableDebugger\n envInfo\n libraryUrl\n adminUrl\n challengeQuestion {\n id\n date\n incompleteChallengeCount\n streakCount\n type\n __typename\n }\n __typename\n }\n}\n"
|
||||
}
|
||||
headers = {
|
||||
'x-csrftoken': csrftoken.group(1),
|
||||
'referer':problemUrl,
|
||||
'content-type':'application/json',
|
||||
'origin':'https://leetcode.com',
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36'
|
||||
}
|
||||
cookies = {
|
||||
'__cfduid':'d9ce37537c705e759f6bea15fffc9c58b1525271602',
|
||||
'_ga':'GA1.2.5783653.1525271604',
|
||||
'_gid':'GA1.2.344320119.1533189808',
|
||||
'csrftoken':csrftoken.group(1),
|
||||
' _gat':'1'
|
||||
}
|
||||
#payload表单为json格式
|
||||
|
||||
dumpJsonData = json.dumps(data)
|
||||
response = requests.post(url,data = dumpJsonData, headers = headers,cookies = cookies)
|
||||
dictInfo = json.loads(response.text)
|
||||
if dictInfo["data"]["question"].get("content") is not None:
|
||||
saveJSON(dictInfo, title + ".json")
|
||||
content = dictInfo["data"]["question"]["content"]
|
||||
save_problem(title,content)
|
||||
# soup = BeautifulSoup(content, 'lxml')
|
||||
# save_problem(title,soup.prettify())
|
||||
else:
|
||||
saveJSON(dictInfo, "[no content]" + title + ".json")
|
||||
# print("no content")
|
||||
except Exception as e:
|
||||
print("[error] ", e, problemUrl)
|
||||
|
||||
def saveJSON(data, filename):
|
||||
with open(filename, 'w', encoding='utf-8') as f:
|
||||
json.dump(data, f, ensure_ascii=False, indent=4)
|
||||
|
||||
def main():
|
||||
# url = "https://leetcode.com/api/problems/all/"
|
||||
# html = json.loads(get_proble_set(url))
|
||||
# problemset = html["stat_status_pairs"]
|
||||
# saveJSON(html, "[en]json1-origin-data.json")
|
||||
# saveJSON(problemset, "[en]json2-problemset.json")
|
||||
|
||||
# url = "https://leetcode-cn.com/api/problems/all/"
|
||||
# html = json.loads(get_proble_set(url))
|
||||
# problemset = html["stat_status_pairs"]
|
||||
# saveJSON(html, "[cn]json1-origin-data.json")
|
||||
# saveJSON(problemset, "[cn]json2-problemset.json")
|
||||
# exit()
|
||||
|
||||
problemset = json.load(open("[en]json2-problemset.json", 'r', encoding='utf-8'))
|
||||
parse_proble_set(problemset)
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
if os.path.exists("算法题"):
|
||||
os.chdir("算法题")
|
||||
else:
|
||||
os.mkdir("算法题")
|
||||
os.chdir("算法题")
|
||||
main()
|
54046
算法题/[cn]json1-origin-data.json
Normal file
54046
算法题/[cn]json1-origin-data.json
Normal file
File diff suppressed because it is too large
Load Diff
54035
算法题/[cn]json2-problemset.json
Normal file
54035
算法题/[cn]json2-problemset.json
Normal file
File diff suppressed because it is too large
Load Diff
51027
算法题/[en]json1-origin-data.json
Normal file
51027
算法题/[en]json1-origin-data.json
Normal file
File diff suppressed because it is too large
Load Diff
51016
算法题/[en]json2-problemset.json
Normal file
51016
算法题/[en]json2-problemset.json
Normal file
File diff suppressed because it is too large
Load Diff
71
算法题/[no content]accepted-candidates-from-the-interviews.json
Normal file
71
算法题/[no content]accepted-candidates-from-the-interviews.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
58
算法题/[no content]account-balance.json
Normal file
58
算法题/[no content]account-balance.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
66
算法题/[no content]active-users.json
Normal file
66
算法题/[no content]active-users.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
64
算法题/[no content]activity-participants.json
Normal file
64
算法题/[no content]activity-participants.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
63
算法题/[no content]ad-free-sessions.json
Normal file
63
算法题/[no content]ad-free-sessions.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
63
算法题/[no content]ads-performance.json
Normal file
63
算法题/[no content]ads-performance.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
61
算法题/[no content]all-people-report-to-the-given-manager.json
Normal file
61
算法题/[no content]all-people-report-to-the-given-manager.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
67
算法题/[no content]amount-of-new-area-painted-each-day.json
Normal file
67
算法题/[no content]amount-of-new-area-painted-each-day.json
Normal file
File diff suppressed because one or more lines are too long
61
算法题/[no content]apples-oranges.json
Normal file
61
算法题/[no content]apples-oranges.json
Normal 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
63
算法题/[no content]average-selling-price.json
Normal file
63
算法题/[no content]average-selling-price.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
65
算法题/[no content]average-time-of-process-per-machine.json
Normal file
65
算法题/[no content]average-time-of-process-per-machine.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
62
算法题/[no content]bank-account-summary.json
Normal file
62
算法题/[no content]bank-account-summary.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
59
算法题/[no content]biggest-window-between-visits.json
Normal file
59
算法题/[no content]biggest-window-between-visits.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
91
算法题/[no content]binary-search-tree-iterator-ii.json
Normal file
91
算法题/[no content]binary-search-tree-iterator-ii.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
66
算法题/[no content]brightest-position-on-street.json
Normal file
66
算法题/[no content]brightest-position-on-street.json
Normal file
File diff suppressed because one or more lines are too long
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
56
算法题/[no content]build-the-equation.json
Normal file
56
算法题/[no content]build-the-equation.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
72
算法题/[no content]buildings-with-an-ocean-view.json
Normal file
72
算法题/[no content]buildings-with-an-ocean-view.json
Normal file
File diff suppressed because one or more lines are too long
63
算法题/[no content]calculate-salaries.json
Normal file
63
算法题/[no content]calculate-salaries.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
65
算法题/[no content]change-the-root-of-a-binary-tree.json
Normal file
65
算法题/[no content]change-the-root-of-a-binary-tree.json
Normal 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
@ -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
60
算法题/[no content]choose-numbers-from-two-arrays-in-range.json
Normal file
60
算法题/[no content]choose-numbers-from-two-arrays-in-range.json
Normal file
File diff suppressed because one or more lines are too long
84
算法题/[no content]clone-binary-tree-with-random-pointer.json
Normal file
84
算法题/[no content]clone-binary-tree-with-random-pointer.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
85
算法题/[no content]clone-n-ary-tree.json
Normal file
85
算法题/[no content]clone-n-ary-tree.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
66
算法题/[no content]confirmation-rate.json
Normal file
66
算法题/[no content]confirmation-rate.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
56
算法题/[no content]convert-date-format.json
Normal file
56
算法题/[no content]convert-date-format.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
76
算法题/[no content]correct-a-binary-tree.json
Normal file
76
算法题/[no content]correct-a-binary-tree.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
67
算法题/[no content]count-apples-and-oranges.json
Normal file
67
算法题/[no content]count-apples-and-oranges.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
71
算法题/[no content]count-nodes-equal-to-sum-of-descendants.json
Normal file
71
算法题/[no content]count-nodes-equal-to-sum-of-descendants.json
Normal file
File diff suppressed because one or more lines are too long
67
算法题/[no content]count-pairs-in-two-arrays.json
Normal file
67
算法题/[no content]count-pairs-in-two-arrays.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
57
算法题/[no content]count-salary-categories.json
Normal file
57
算法题/[no content]count-salary-categories.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
59
算法题/[no content]count-the-number-of-experiments.json
Normal file
59
算法题/[no content]count-the-number-of-experiments.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
55
算法题/[no content]count-ways-to-distribute-candies.json
Normal file
55
算法题/[no content]count-ways-to-distribute-candies.json
Normal file
File diff suppressed because one or more lines are too long
66
算法题/[no content]counting-elements.json
Normal file
66
算法题/[no content]counting-elements.json
Normal file
File diff suppressed because one or more lines are too long
78
算法题/[no content]countries-you-can-safely-invest-in.json
Normal file
78
算法题/[no content]countries-you-can-safely-invest-in.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
58
算法题/[no content]create-a-session-bar-chart.json
Normal file
58
算法题/[no content]create-a-session-bar-chart.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
72
算法题/[no content]customer-order-frequency.json
Normal file
72
算法题/[no content]customer-order-frequency.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1536",
|
||||
"questionFrontendId": "1398",
|
||||
"boundTopicId": null,
|
||||
"title": "Customers Who Bought Products A and B but Not C",
|
||||
"titleSlug": "customers-who-bought-products-a-and-b-but-not-c",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 156,
|
||||
"dislikes": 7,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Customers\":[\"customer_id\",\"customer_name\"],\"Orders\":[\"order_id\",\"customer_id\",\"product_name\"]},\"rows\":{\"Customers\":[[1,\"Daniel\"],[2,\"Diana\"],[3,\"Elizabeth\"],[4,\"Jhon\"]],\"Orders\":[[10,1,\"A\"],[20,1,\"B\"],[30,1,\"D\"],[40,1,\"C\"],[50,2,\"A\"],[60,3,\"A\"],[70,3,\"B\"],[80,3,\"D\"],[90,4,\"C\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"26.8K\", \"totalSubmission\": \"33.9K\", \"totalAcceptedRaw\": 26763, \"totalSubmissionRaw\": 33904, \"acRate\": \"78.9%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Customers\":[\"customer_id\",\"customer_name\"],\"Orders\":[\"order_id\",\"customer_id\",\"product_name\"]},\"rows\":{\"Customers\":[[1,\"Daniel\"],[2,\"Diana\"],[3,\"Elizabeth\"],[4,\"Jhon\"]],\"Orders\":[[10,1,\"A\"],[20,1,\"B\"],[30,1,\"D\"],[40,1,\"C\"],[50,2,\"A\"],[60,3,\"A\"],[70,3,\"B\"],[80,3,\"D\"],[90,4,\"C\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Customers (customer_id int, customer_name varchar(30))\",\n \"Create table If Not Exists Orders (order_id int, customer_id int, product_name varchar(30))\"\n ],\n \"mssql\": [\n \"Create table Customers (customer_id int, customer_name varchar(30))\",\n \"Create table Orders (order_id int, customer_id int, product_name varchar(30))\"\n ],\n \"oraclesql\": [\n \"Create table Customers (customer_id int, customer_name varchar(30))\",\n \"Create table Orders (order_id int, customer_id int, product_name varchar(30))\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Customers (customer_id int, customer_name varchar(30))",
|
||||
"Create table If Not Exists Orders (order_id int, customer_id int, product_name varchar(30))",
|
||||
"Truncate table Customers",
|
||||
"insert into Customers (customer_id, customer_name) values ('1', 'Daniel')",
|
||||
"insert into Customers (customer_id, customer_name) values ('2', 'Diana')",
|
||||
"insert into Customers (customer_id, customer_name) values ('3', 'Elizabeth')",
|
||||
"insert into Customers (customer_id, customer_name) values ('4', 'Jhon')",
|
||||
"Truncate table Orders",
|
||||
"insert into Orders (order_id, customer_id, product_name) values ('10', '1', 'A')",
|
||||
"insert into Orders (order_id, customer_id, product_name) values ('20', '1', 'B')",
|
||||
"insert into Orders (order_id, customer_id, product_name) values ('30', '1', 'D')",
|
||||
"insert into Orders (order_id, customer_id, product_name) values ('40', '1', 'C')",
|
||||
"insert into Orders (order_id, customer_id, product_name) values ('50', '2', 'A')",
|
||||
"insert into Orders (order_id, customer_id, product_name) values ('60', '3', 'A')",
|
||||
"insert into Orders (order_id, customer_id, product_name) values ('70', '3', 'B')",
|
||||
"insert into Orders (order_id, customer_id, product_name) values ('80', '3', 'D')",
|
||||
"insert into Orders (order_id, customer_id, product_name) values ('90', '4', 'C')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
59
算法题/[no content]cutting-ribbons.json
Normal file
59
算法题/[no content]cutting-ribbons.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
71
算法题/[no content]depth-of-bst-given-insertion-order.json
Normal file
71
算法题/[no content]depth-of-bst-given-insertion-order.json
Normal file
File diff suppressed because one or more lines are too long
71
算法题/[no content]design-a-file-sharing-system.json
Normal file
71
算法题/[no content]design-a-file-sharing-system.json
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,79 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1768",
|
||||
"questionFrontendId": "1628",
|
||||
"boundTopicId": null,
|
||||
"title": "Design an Expression Tree With Evaluate Function",
|
||||
"titleSlug": "design-an-expression-tree-with-evaluate-function",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 313,
|
||||
"dislikes": 50,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "[\"3\",\"4\",\"+\",\"2\",\"*\",\"7\",\"/\"]\n[\"4\",\"5\",\"2\",\"7\",\"+\",\"-\",\"*\"]",
|
||||
"categoryTitle": "Algorithms",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Math",
|
||||
"slug": "math",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
},
|
||||
{
|
||||
"name": "Stack",
|
||||
"slug": "stack",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
},
|
||||
{
|
||||
"name": "Tree",
|
||||
"slug": "tree",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
},
|
||||
{
|
||||
"name": "Design",
|
||||
"slug": "design",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
},
|
||||
{
|
||||
"name": "Binary Tree",
|
||||
"slug": "binary-tree",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"14.6K\", \"totalSubmission\": \"17.9K\", \"totalAcceptedRaw\": 14626, \"totalSubmissionRaw\": 17910, \"acRate\": \"81.7%\"}",
|
||||
"hints": [
|
||||
"Apply the concept of Polymorphism to get a good design",
|
||||
"Implement the Node class using NumericNode and OperatorNode classes.",
|
||||
"NumericNode only maintains the value and evaluate returns this value.",
|
||||
"OperatorNode Maintains the left and right nodes representing the left and right operands, and the evaluate function applies the operator to them."
|
||||
],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "[\"3\",\"4\",\"+\",\"2\",\"*\",\"7\",\"/\"]",
|
||||
"metaData": "{\n \"name\": \"buildTree\",\n \"params\": [\n {\n \"name\": \"s\",\n \"type\": \"string[]\"\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"
|
||||
}
|
||||
}
|
||||
}
|
84
算法题/[no content]design-most-recently-used-queue.json
Normal file
84
算法题/[no content]design-most-recently-used-queue.json
Normal file
File diff suppressed because one or more lines are too long
66
算法题/[no content]diameter-of-n-ary-tree.json
Normal file
66
算法题/[no content]diameter-of-n-ary-tree.json
Normal file
File diff suppressed because one or more lines are too long
72
算法题/[no content]distance-to-a-cycle-in-undirected-graph.json
Normal file
72
算法题/[no content]distance-to-a-cycle-in-undirected-graph.json
Normal file
File diff suppressed because one or more lines are too long
66
算法题/[no content]distinct-numbers-in-each-subarray.json
Normal file
66
算法题/[no content]distinct-numbers-in-each-subarray.json
Normal file
File diff suppressed because one or more lines are too long
77
算法题/[no content]dot-product-of-two-sparse-vectors.json
Normal file
77
算法题/[no content]dot-product-of-two-sparse-vectors.json
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,61 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "2224",
|
||||
"questionFrontendId": "2084",
|
||||
"boundTopicId": null,
|
||||
"title": "Drop Type 1 Orders for Customers With Type 0 Orders",
|
||||
"titleSlug": "drop-type-1-orders-for-customers-with-type-0-orders",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 23,
|
||||
"dislikes": 4,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": null,
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"2.7K\", \"totalSubmission\": \"2.9K\", \"totalAcceptedRaw\": 2679, \"totalSubmissionRaw\": 2947, \"acRate\": \"90.9%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Orders\":[\"order_id\",\"customer_id\",\"order_type\"]},\"rows\":{\"Orders\":[[1,1,0],[2,1,0],[11,2,0],[12,2,1],[21,3,1],[22,3,0],[31,4,1],[32,4,1]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Orders (order_id int, customer_id int, order_type int)\"\n ],\n \"mssql\": [\n \"Create table Orders (order_id int, customer_id int, order_type int)\"\n ],\n \"oraclesql\": [\n \"Create table Orders (order_id int, customer_id int, order_type int)\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Orders (order_id int, customer_id int, order_type int)",
|
||||
"Truncate table Orders",
|
||||
"insert into Orders (order_id, customer_id, order_type) values ('1', '1', '0')",
|
||||
"insert into Orders (order_id, customer_id, order_type) values ('2', '1', '0')",
|
||||
"insert into Orders (order_id, customer_id, order_type) values ('11', '2', '0')",
|
||||
"insert into Orders (order_id, customer_id, order_type) values ('12', '2', '1')",
|
||||
"insert into Orders (order_id, customer_id, order_type) values ('21', '3', '1')",
|
||||
"insert into Orders (order_id, customer_id, order_type) values ('22', '3', '0')",
|
||||
"insert into Orders (order_id, customer_id, order_type) values ('31', '4', '1')",
|
||||
"insert into Orders (order_id, customer_id, order_type) values ('32', '4', '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
@ -0,0 +1,59 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "2127",
|
||||
"questionFrontendId": "1978",
|
||||
"boundTopicId": null,
|
||||
"title": "Employees Whose Manager Left the Company",
|
||||
"titleSlug": "employees-whose-manager-left-the-company",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Easy",
|
||||
"likes": 22,
|
||||
"dislikes": 4,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\": {\"Employees\": [\"employee_id\", \"name\", \"manager_id\", \"salary\"]}, \"rows\": {\"Employees\": [[3, \"Mila\", 9, 60301], [12, \"Antonella\", null, 31000], [13, \"Emery\", null, 67084], [1, \"Kalel\", 11, 21241], [9, \"Mikaela\", null, 50937], [11, \"Joziah\", 6, 28485]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"4.4K\", \"totalSubmission\": \"8.7K\", \"totalAcceptedRaw\": 4353, \"totalSubmissionRaw\": 8720, \"acRate\": \"49.9%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"Employees\": [\"employee_id\", \"name\", \"manager_id\", \"salary\"]}, \"rows\": {\"Employees\": [[3, \"Mila\", 9, 60301], [12, \"Antonella\", null, 31000], [13, \"Emery\", null, 67084], [1, \"Kalel\", 11, 21241], [9, \"Mikaela\", null, 50937], [11, \"Joziah\", 6, 28485]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Employees (employee_id int, name varchar(20), manager_id int, salary int)\"\n ],\n \"mssql\": [\n \"Create table Employees (employee_id int, name varchar(20), manager_id int, salary int)\"\n ],\n \"oraclesql\": [\n \"Create table Employees (employee_id int, name varchar(20), manager_id int, salary int)\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Employees (employee_id int, name varchar(20), manager_id int, salary int)",
|
||||
"Truncate table Employees",
|
||||
"insert into Employees (employee_id, name, manager_id, salary) values ('3', 'Mila', '9', '60301')",
|
||||
"insert into Employees (employee_id, name, manager_id, salary) values ('12', 'Antonella', 'None', '31000')",
|
||||
"insert into Employees (employee_id, name, manager_id, salary) values ('13', 'Emery', 'None', '67084')",
|
||||
"insert into Employees (employee_id, name, manager_id, salary) values ('1', 'Kalel', '11', '21241')",
|
||||
"insert into Employees (employee_id, name, manager_id, salary) values ('9', 'Mikaela', 'None', '50937')",
|
||||
"insert into Employees (employee_id, name, manager_id, salary) values ('11', 'Joziah', '6', '28485')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
65
算法题/[no content]erect-the-fence-ii.json
Normal file
65
算法题/[no content]erect-the-fence-ii.json
Normal file
File diff suppressed because one or more lines are too long
63
算法题/[no content]evaluate-boolean-expression.json
Normal file
63
算法题/[no content]evaluate-boolean-expression.json
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1565",
|
||||
"questionFrontendId": "1440",
|
||||
"boundTopicId": null,
|
||||
"title": "Evaluate Boolean Expression",
|
||||
"titleSlug": "evaluate-boolean-expression",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 111,
|
||||
"dislikes": 6,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Variables\":[\"name\",\"value\"],\"Expressions\":[\"left_operand\",\"operator\",\"right_operand\"]},\"rows\":{\"Variables\":[[\"x\",66],[\"y\",77]],\"Expressions\":[[\"x\",\">\",\"y\"],[\"x\",\"<\",\"y\"],[\"x\",\"=\",\"y\"],[\"y\",\">\",\"x\"],[\"y\",\"<\",\"x\"],[\"x\",\"=\",\"x\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"11.8K\", \"totalSubmission\": \"15.6K\", \"totalAcceptedRaw\": 11759, \"totalSubmissionRaw\": 15557, \"acRate\": \"75.6%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Variables\":[\"name\",\"value\"],\"Expressions\":[\"left_operand\",\"operator\",\"right_operand\"]},\"rows\":{\"Variables\":[[\"x\",66],[\"y\",77]],\"Expressions\":[[\"x\",\">\",\"y\"],[\"x\",\"<\",\"y\"],[\"x\",\"=\",\"y\"],[\"y\",\">\",\"x\"],[\"y\",\"<\",\"x\"],[\"x\",\"=\",\"x\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create Table If Not Exists Variables (name varchar(3), value int)\",\n \"Create Table If Not Exists Expressions (left_operand varchar(3), operator ENUM('>', '<', '='), right_operand varchar(3))\"\n ],\n \"mssql\": [\n \"Create Table Variables (name varchar(3), value int)\",\n \"Create Table Expressions (left_operand varchar(3), operator varchar(3) NOT NULL CHECK (operator IN ('>', '<', '=')), right_operand varchar(3))\"\n ],\n \"oraclesql\": [\n \"Create Table Variables (name varchar(3), value int)\",\n \"Create Table Expressions (left_operand varchar(3), operator varchar(3) NOT NULL CHECK (operator IN ('>', '<', '=')), right_operand varchar(3))\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create Table If Not Exists Variables (name varchar(3), value int)",
|
||||
"Create Table If Not Exists Expressions (left_operand varchar(3), operator ENUM('>', '<', '='), right_operand varchar(3))",
|
||||
"Truncate table Variables",
|
||||
"insert into Variables (name, value) values ('x', '66')",
|
||||
"insert into Variables (name, value) values ('y', '77')",
|
||||
"Truncate table Expressions",
|
||||
"insert into Expressions (left_operand, operator, right_operand) values ('x', '>', 'y')",
|
||||
"insert into Expressions (left_operand, operator, right_operand) values ('x', '<', 'y')",
|
||||
"insert into Expressions (left_operand, operator, right_operand) values ('x', '=', 'y')",
|
||||
"insert into Expressions (left_operand, operator, right_operand) values ('y', '>', 'x')",
|
||||
"insert into Expressions (left_operand, operator, right_operand) values ('y', '<', 'x')",
|
||||
"insert into Expressions (left_operand, operator, right_operand) values ('x', '=', 'x')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
60
算法题/[no content]faulty-sensor.json
Normal file
60
算法题/[no content]faulty-sensor.json
Normal file
File diff suppressed because one or more lines are too long
71
算法题/[no content]find-all-the-lonely-nodes.json
Normal file
71
算法题/[no content]find-all-the-lonely-nodes.json
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,60 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1974",
|
||||
"questionFrontendId": "1821",
|
||||
"boundTopicId": null,
|
||||
"title": "Find Customers With Positive Revenue this Year",
|
||||
"titleSlug": "find-customers-with-positive-revenue-this-year",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Easy",
|
||||
"likes": 21,
|
||||
"dislikes": 15,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Customers\":[\"customer_id\",\"year\",\"revenue\"]},\"rows\":{\"Customers\":[[\"1\",\"2018\",\"50\"],[\"1\",\"2021\",\"30\"],[\"1\",\"2020\",\"70\"],[\"2\",\"2021\",\"-50\"],[\"3\",\"2018\",\"10\"],[\"3\",\"2016\",\"50\"],[\"4\",\"2021\",\"20\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"9.2K\", \"totalSubmission\": \"10.2K\", \"totalAcceptedRaw\": 9168, \"totalSubmissionRaw\": 10219, \"acRate\": \"89.7%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Customers\":[\"customer_id\",\"year\",\"revenue\"]},\"rows\":{\"Customers\":[[\"1\",\"2018\",\"50\"],[\"1\",\"2021\",\"30\"],[\"1\",\"2020\",\"70\"],[\"2\",\"2021\",\"-50\"],[\"3\",\"2018\",\"10\"],[\"3\",\"2016\",\"50\"],[\"4\",\"2021\",\"20\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Customers (customer_id int, year int, revenue int)\"\n ],\n \"mssql\": [\n \"Create table Customers (customer_id int, year int, revenue int)\"\n ],\n \"oraclesql\": [\n \"Create table Customers (customer_id int, year int, revenue int)\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Customers (customer_id int, year int, revenue int)",
|
||||
"Truncate table Customers",
|
||||
"insert into Customers (customer_id, year, revenue) values ('1', '2018', '50')",
|
||||
"insert into Customers (customer_id, year, revenue) values ('1', '2021', '30')",
|
||||
"insert into Customers (customer_id, year, revenue) values ('1', '2020', '70')",
|
||||
"insert into Customers (customer_id, year, revenue) values ('2', '2021', '-50')",
|
||||
"insert into Customers (customer_id, year, revenue) values ('3', '2018', '10')",
|
||||
"insert into Customers (customer_id, year, revenue) values ('3', '2016', '50')",
|
||||
"insert into Customers (customer_id, year, revenue) values ('4', '2021', '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"
|
||||
}
|
||||
}
|
||||
}
|
64
算法题/[no content]find-cutoff-score-for-each-school.json
Normal file
64
算法题/[no content]find-cutoff-score-for-each-school.json
Normal file
@ -0,0 +1,64 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "2136",
|
||||
"questionFrontendId": "1988",
|
||||
"boundTopicId": null,
|
||||
"title": "Find Cutoff Score for Each School",
|
||||
"titleSlug": "find-cutoff-score-for-each-school",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 23,
|
||||
"dislikes": 56,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Schools\":[\"school_id\",\"capacity\"],\"Exam\":[\"score\",\"student_count\"]},\"rows\":{\"Schools\":[[11,151],[5,48],[9,9],[10,99]],\"Exam\":[[975,10],[966,60],[844,76],[749,76],[744,100]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"2.9K\", \"totalSubmission\": \"4.2K\", \"totalAcceptedRaw\": 2873, \"totalSubmissionRaw\": 4152, \"acRate\": \"69.2%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Schools\":[\"school_id\",\"capacity\"],\"Exam\":[\"score\",\"student_count\"]},\"rows\":{\"Schools\":[[11,151],[5,48],[9,9],[10,99]],\"Exam\":[[975,10],[966,60],[844,76],[749,76],[744,100]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Schools (school_id int, capacity int)\",\n \"Create table If Not Exists Exam (score int, student_count int)\"\n ],\n \"mssql\": [\n \"Create table Schools (school_id int, capacity int)\",\n \"Create table Exam (score int, student_count int)\"\n ],\n \"oraclesql\": [\n \"Create table Schools (school_id int, capacity int)\",\n \"Create table Exam (score int, student_count int)\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Schools (school_id int, capacity int)",
|
||||
"Create table If Not Exists Exam (score int, student_count int)",
|
||||
"Truncate table Schools",
|
||||
"insert into Schools (school_id, capacity) values ('11', '151')",
|
||||
"insert into Schools (school_id, capacity) values ('5', '48')",
|
||||
"insert into Schools (school_id, capacity) values ('9', '9')",
|
||||
"insert into Schools (school_id, capacity) values ('10', '99')",
|
||||
"Truncate table Exam",
|
||||
"insert into Exam (score, student_count) values ('975', '10')",
|
||||
"insert into Exam (score, student_count) values ('966', '60')",
|
||||
"insert into Exam (score, student_count) values ('844', '76')",
|
||||
"insert into Exam (score, student_count) values ('749', '76')",
|
||||
"insert into Exam (score, student_count) values ('744', '100')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
77
算法题/[no content]find-distance-in-a-binary-tree.json
Normal file
77
算法题/[no content]find-distance-in-a-binary-tree.json
Normal file
File diff suppressed because one or more lines are too long
67
算法题/[no content]find-interview-candidates.json
Normal file
67
算法题/[no content]find-interview-candidates.json
Normal file
@ -0,0 +1,67 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1964",
|
||||
"questionFrontendId": "1811",
|
||||
"boundTopicId": null,
|
||||
"title": "Find Interview Candidates",
|
||||
"titleSlug": "find-interview-candidates",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 105,
|
||||
"dislikes": 15,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Contests\":[\"contest_id\",\"gold_medal\",\"silver_medal\",\"bronze_medal\"],\"Users\":[\"user_id\",\"mail\",\"name\"]},\"rows\":{\"Contests\":[[190,1,5,2],[191,2,3,5],[192,5,2,3],[193,1,3,5],[194,4,5,2],[195,4,2,1],[196,1,5,2]],\"Users\":[[1,\"sarah@leetcode.com\",\"Sarah\"],[2,\"bob@leetcode.com\",\"Bob\"],[3,\"alice@leetcode.com\",\"Alice\"],[4,\"hercy@leetcode.com\",\"Hercy\"],[5,\"quarz@leetcode.com\",\"Quarz\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"7.6K\", \"totalSubmission\": \"11.6K\", \"totalAcceptedRaw\": 7594, \"totalSubmissionRaw\": 11588, \"acRate\": \"65.5%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Contests\":[\"contest_id\",\"gold_medal\",\"silver_medal\",\"bronze_medal\"],\"Users\":[\"user_id\",\"mail\",\"name\"]},\"rows\":{\"Contests\":[[190,1,5,2],[191,2,3,5],[192,5,2,3],[193,1,3,5],[194,4,5,2],[195,4,2,1],[196,1,5,2]],\"Users\":[[1,\"sarah@leetcode.com\",\"Sarah\"],[2,\"bob@leetcode.com\",\"Bob\"],[3,\"alice@leetcode.com\",\"Alice\"],[4,\"hercy@leetcode.com\",\"Hercy\"],[5,\"quarz@leetcode.com\",\"Quarz\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Contests (contest_id int, gold_medal int, silver_medal int, bronze_medal int)\",\n \"Create table If Not Exists Users (user_id int, mail varchar(50), name varchar(30))\"\n ],\n \"mssql\": [\n \"Create table Contests (contest_id int, gold_medal int, silver_medal int, bronze_medal int)\",\n \"Create table Users (user_id int, mail varchar(50), name varchar(30))\"\n ],\n \"oraclesql\": [\n \"Create table Contests (contest_id int, gold_medal int, silver_medal int, bronze_medal int)\",\n \"Create table Users (user_id int, mail varchar(50), name varchar(30))\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Contests (contest_id int, gold_medal int, silver_medal int, bronze_medal int)",
|
||||
"Create table If Not Exists Users (user_id int, mail varchar(50), name varchar(30))",
|
||||
"Truncate table Contests",
|
||||
"insert into Contests (contest_id, gold_medal, silver_medal, bronze_medal) values ('190', '1', '5', '2')",
|
||||
"insert into Contests (contest_id, gold_medal, silver_medal, bronze_medal) values ('191', '2', '3', '5')",
|
||||
"insert into Contests (contest_id, gold_medal, silver_medal, bronze_medal) values ('192', '5', '2', '3')",
|
||||
"insert into Contests (contest_id, gold_medal, silver_medal, bronze_medal) values ('193', '1', '3', '5')",
|
||||
"insert into Contests (contest_id, gold_medal, silver_medal, bronze_medal) values ('194', '4', '5', '2')",
|
||||
"insert into Contests (contest_id, gold_medal, silver_medal, bronze_medal) values ('195', '4', '2', '1')",
|
||||
"insert into Contests (contest_id, gold_medal, silver_medal, bronze_medal) values ('196', '1', '5', '2')",
|
||||
"Truncate table Users",
|
||||
"insert into Users (user_id, mail, name) values ('1', 'sarah@leetcode.com', 'Sarah')",
|
||||
"insert into Users (user_id, mail, name) values ('2', 'bob@leetcode.com', 'Bob')",
|
||||
"insert into Users (user_id, mail, name) values ('3', 'alice@leetcode.com', 'Alice')",
|
||||
"insert into Users (user_id, mail, name) values ('4', 'hercy@leetcode.com', 'Hercy')",
|
||||
"insert into Users (user_id, mail, name) values ('5', 'quarz@leetcode.com', 'Quarz')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
81
算法题/[no content]find-nearest-right-node-in-binary-tree.json
Normal file
81
算法题/[no content]find-nearest-right-node-in-binary-tree.json
Normal file
File diff suppressed because one or more lines are too long
77
算法题/[no content]find-root-of-n-ary-tree.json
Normal file
77
算法题/[no content]find-root-of-n-ary-tree.json
Normal file
@ -0,0 +1,77 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1650",
|
||||
"questionFrontendId": "1506",
|
||||
"boundTopicId": null,
|
||||
"title": "Find Root of N-Ary Tree",
|
||||
"titleSlug": "find-root-of-n-ary-tree",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 323,
|
||||
"dislikes": 113,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Move Sub-Tree of N-Ary Tree\", \"titleSlug\": \"move-sub-tree-of-n-ary-tree\", \"difficulty\": \"Hard\", \"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": "Bit Manipulation",
|
||||
"slug": "bit-manipulation",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
},
|
||||
{
|
||||
"name": "Tree",
|
||||
"slug": "tree",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
},
|
||||
{
|
||||
"name": "Depth-First Search",
|
||||
"slug": "depth-first-search",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"20.6K\", \"totalSubmission\": \"26.4K\", \"totalAcceptedRaw\": 20602, \"totalSubmissionRaw\": 26359, \"acRate\": \"78.2%\"}",
|
||||
"hints": [
|
||||
"Node with indegree 0 is the root"
|
||||
],
|
||||
"solution": {
|
||||
"id": "1057",
|
||||
"canSeeDetail": false,
|
||||
"paidOnly": true,
|
||||
"hasVideoSolution": false,
|
||||
"paidOnlyVideo": true,
|
||||
"__typename": "ArticleNode"
|
||||
},
|
||||
"status": null,
|
||||
"sampleTestCase": "[1,null,3,2,4,null,5,6]",
|
||||
"metaData": "{\n \"name\": \"findRoot\",\n \"params\": [\n {\n \"name\": \"tree\",\n \"type\": \"integer\"\n }\n ],\n \"return\": {\n \"type\": \"integer\"\n },\n \"languages\": [\n \"cpp\",\n \"java\",\n \"python\",\n \"javascript\",\n \"python3\",\n \"csharp\",\n \"typescript\",\n \"ruby\",\n \"swift\",\n \"golang\",\n \"scala\",\n \"kotlin\",\n \"php\"\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>\"], \"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"
|
||||
}
|
||||
}
|
||||
}
|
65
算法题/[no content]find-the-index-of-the-large-integer.json
Normal file
65
算法题/[no content]find-the-index-of-the-large-integer.json
Normal file
File diff suppressed because one or more lines are too long
56
算法题/[no content]find-the-missing-ids.json
Normal file
56
算法题/[no content]find-the-missing-ids.json
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1759",
|
||||
"questionFrontendId": "1613",
|
||||
"boundTopicId": null,
|
||||
"title": "Find the Missing IDs",
|
||||
"titleSlug": "find-the-missing-ids",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 125,
|
||||
"dislikes": 19,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Report Contiguous Dates\", \"titleSlug\": \"report-contiguous-dates\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Find the Start and End Number of Continuous Ranges\", \"titleSlug\": \"find-the-start-and-end-number-of-continuous-ranges\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Number of Transactions per Visit\", \"titleSlug\": \"number-of-transactions-per-visit\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]",
|
||||
"exampleTestcases": "{\"headers\": {\"Customers\": [\"customer_id\", \"customer_name\"]}, \"rows\": {\"Customers\": [[1, \"Alice\"], [4, \"Bob\"], [5, \"Charlie\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"9.7K\", \"totalSubmission\": \"12.8K\", \"totalAcceptedRaw\": 9746, \"totalSubmissionRaw\": 12824, \"acRate\": \"76.0%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"Customers\": [\"customer_id\", \"customer_name\"]}, \"rows\": {\"Customers\": [[1, \"Alice\"], [4, \"Bob\"], [5, \"Charlie\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Customers (customer_id int, customer_name varchar(20))\"\n ],\n \"mssql\": [\n \"Create table Customers (customer_id int, customer_name varchar(20))\\n\"\n ],\n \"oraclesql\": [\n \"Create table Customers (customer_id int, customer_name varchar(20))\\n\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Customers (customer_id int, customer_name varchar(20))",
|
||||
"Truncate table Customers",
|
||||
"insert into Customers (customer_id, customer_name) values ('1', 'Alice')",
|
||||
"insert into Customers (customer_id, customer_name) values ('4', 'Bob')",
|
||||
"insert into Customers (customer_id, customer_name) values ('5', 'Charlie')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
70
算法题/[no content]find-the-quiet-students-in-all-exams.json
Normal file
70
算法题/[no content]find-the-quiet-students-in-all-exams.json
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1546",
|
||||
"questionFrontendId": "1412",
|
||||
"boundTopicId": null,
|
||||
"title": "Find the Quiet Students in All Exams",
|
||||
"titleSlug": "find-the-quiet-students-in-all-exams",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 142,
|
||||
"dislikes": 11,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\": {\"Student\": [\"student_id\", \"student_name\"], \"Exam\": [\"exam_id\", \"student_id\", \"score\"]}, \"rows\": {\"Student\": [[1, \"Daniel\"], [2, \"Jade\"], [3, \"Stella\"], [4, \"Jonathan\"], [5, \"Will\"]], \"Exam\": [[10, 1, 70], [10, 2, 80], [10, 3, 90], [20, 1, 80], [30, 1, 70], [30, 3, 80], [30, 4, 90], [40, 1, 60], [40, 2, 70], [40, 4, 80]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"16.1K\", \"totalSubmission\": \"25.6K\", \"totalAcceptedRaw\": 16053, \"totalSubmissionRaw\": 25621, \"acRate\": \"62.7%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"Student\": [\"student_id\", \"student_name\"], \"Exam\": [\"exam_id\", \"student_id\", \"score\"]}, \"rows\": {\"Student\": [[1, \"Daniel\"], [2, \"Jade\"], [3, \"Stella\"], [4, \"Jonathan\"], [5, \"Will\"]], \"Exam\": [[10, 1, 70], [10, 2, 80], [10, 3, 90], [20, 1, 80], [30, 1, 70], [30, 3, 80], [30, 4, 90], [40, 1, 60], [40, 2, 70], [40, 4, 80]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Student (student_id int, student_name varchar(30))\",\n \"Create table If Not Exists Exam (exam_id int, student_id int, score int)\"\n ],\n \"mssql\": [\n \"Create table Student (student_id int, student_name varchar(30))\",\n \"Create table Exam (exam_id int, student_id int, score int)\"\n ],\n \"oraclesql\": [\n \"Create table Student (student_id int, student_name varchar(30))\",\n \"Create table Exam (exam_id int, student_id int, score int)\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Student (student_id int, student_name varchar(30))",
|
||||
"Create table If Not Exists Exam (exam_id int, student_id int, score int)",
|
||||
"Truncate table Student",
|
||||
"insert into Student (student_id, student_name) values ('1', 'Daniel')",
|
||||
"insert into Student (student_id, student_name) values ('2', 'Jade')",
|
||||
"insert into Student (student_id, student_name) values ('3', 'Stella')",
|
||||
"insert into Student (student_id, student_name) values ('4', 'Jonathan')",
|
||||
"insert into Student (student_id, student_name) values ('5', 'Will')",
|
||||
"Truncate table Exam",
|
||||
"insert into Exam (exam_id, student_id, score) values ('10', '1', '70')",
|
||||
"insert into Exam (exam_id, student_id, score) values ('10', '2', '80')",
|
||||
"insert into Exam (exam_id, student_id, score) values ('10', '3', '90')",
|
||||
"insert into Exam (exam_id, student_id, score) values ('20', '1', '80')",
|
||||
"insert into Exam (exam_id, student_id, score) values ('30', '1', '70')",
|
||||
"insert into Exam (exam_id, student_id, score) values ('30', '3', '80')",
|
||||
"insert into Exam (exam_id, student_id, score) values ('30', '4', '90')",
|
||||
"insert into Exam (exam_id, student_id, score) values ('40', '1', '60')",
|
||||
"insert into Exam (exam_id, student_id, score) values ('40', '2', '70')",
|
||||
"insert into Exam (exam_id, student_id, score) values ('40', '4', '80')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1420",
|
||||
"questionFrontendId": "1285",
|
||||
"boundTopicId": null,
|
||||
"title": "Find the Start and End Number of Continuous Ranges",
|
||||
"titleSlug": "find-the-start-and-end-number-of-continuous-ranges",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 332,
|
||||
"dislikes": 24,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Report Contiguous Dates\", \"titleSlug\": \"report-contiguous-dates\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Find the Missing IDs\", \"titleSlug\": \"find-the-missing-ids\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
|
||||
"exampleTestcases": "{\"headers\":{\"Logs\":[\"log_id\"]},\"rows\":{\"Logs\":[[1],[2],[3],[7],[8],[10]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"20.6K\", \"totalSubmission\": \"23.4K\", \"totalAcceptedRaw\": 20644, \"totalSubmissionRaw\": 23398, \"acRate\": \"88.2%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Logs\":[\"log_id\"]},\"rows\":{\"Logs\":[[1],[2],[3],[7],[8],[10]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Logs (log_id int)\"\n ],\n \"mssql\": [\n \"Create table Logs (log_id int)\"\n ],\n \"oraclesql\": [\n \"Create table Logs (log_id int)\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Logs (log_id int)",
|
||||
"Truncate table Logs",
|
||||
"insert into Logs (log_id) values ('1')",
|
||||
"insert into Logs (log_id) values ('2')",
|
||||
"insert into Logs (log_id) values ('3')",
|
||||
"insert into Logs (log_id) values ('7')",
|
||||
"insert into Logs (log_id) values ('8')",
|
||||
"insert into Logs (log_id) values ('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"
|
||||
}
|
||||
}
|
||||
}
|
63
算法题/[no content]find-the-subtasks-that-did-not-execute.json
Normal file
63
算法题/[no content]find-the-subtasks-that-did-not-execute.json
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1914",
|
||||
"questionFrontendId": "1767",
|
||||
"boundTopicId": null,
|
||||
"title": "Find the Subtasks That Did Not Execute",
|
||||
"titleSlug": "find-the-subtasks-that-did-not-execute",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 81,
|
||||
"dislikes": 7,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\": {\"Tasks\": [\"task_id\", \"subtasks_count\"], \"Executed\": [\"task_id\", \"subtask_id\"]}, \"rows\": {\"Tasks\": [[1, 3], [2, 2], [3, 4]], \"Executed\": [[1, 2], [3, 1], [3, 2], [3, 3], [3, 4]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"4.4K\", \"totalSubmission\": \"5.2K\", \"totalAcceptedRaw\": 4395, \"totalSubmissionRaw\": 5232, \"acRate\": \"84.0%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"Tasks\": [\"task_id\", \"subtasks_count\"], \"Executed\": [\"task_id\", \"subtask_id\"]}, \"rows\": {\"Tasks\": [[1, 3], [2, 2], [3, 4]], \"Executed\": [[1, 2], [3, 1], [3, 2], [3, 3], [3, 4]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Tasks (task_id int, subtasks_count int)\",\n \"Create table If Not Exists Executed (task_id int, subtask_id int)\"\n ],\n \"mssql\": [\n \"Create table Tasks (task_id int, subtasks_count int)\",\n \"Create table Executed (task_id int, subtask_id int)\"\n ],\n \"oraclesql\": [\n \"Create table Tasks (task_id int, subtasks_count int)\",\n \"Create table Executed (task_id int, subtask_id int)\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Tasks (task_id int, subtasks_count int)",
|
||||
"Create table If Not Exists Executed (task_id int, subtask_id int)",
|
||||
"Truncate table Tasks",
|
||||
"insert into Tasks (task_id, subtasks_count) values ('1', '3')",
|
||||
"insert into Tasks (task_id, subtasks_count) values ('2', '2')",
|
||||
"insert into Tasks (task_id, subtasks_count) values ('3', '4')",
|
||||
"Truncate table Executed",
|
||||
"insert into Executed (task_id, subtask_id) values ('1', '2')",
|
||||
"insert into Executed (task_id, subtask_id) values ('3', '1')",
|
||||
"insert into Executed (task_id, subtask_id) values ('3', '2')",
|
||||
"insert into Executed (task_id, subtask_id) values ('3', '3')",
|
||||
"insert into Executed (task_id, subtask_id) values ('3', '4')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
59
算法题/[no content]find-the-team-size.json
Normal file
59
算法题/[no content]find-the-team-size.json
Normal file
@ -0,0 +1,59 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1438",
|
||||
"questionFrontendId": "1303",
|
||||
"boundTopicId": null,
|
||||
"title": "Find the Team Size",
|
||||
"titleSlug": "find-the-team-size",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Easy",
|
||||
"likes": 205,
|
||||
"dislikes": 12,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Employee\":[\"employee_id\",\"team_id\"]},\"rows\":{\"Employee\":[[1,8],[2,8],[3,8],[4,7],[5,9],[6,9]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"39K\", \"totalSubmission\": \"43K\", \"totalAcceptedRaw\": 38976, \"totalSubmissionRaw\": 42969, \"acRate\": \"90.7%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Employee\":[\"employee_id\",\"team_id\"]},\"rows\":{\"Employee\":[[1,8],[2,8],[3,8],[4,7],[5,9],[6,9]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Employee (employee_id int, team_id int)\"\n ],\n \"mssql\": [\n \"Create table Employee (employee_id int, team_id int)\"\n ],\n \"oraclesql\": [\n \"Create table Employee (employee_id int, team_id int)\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Employee (employee_id int, team_id int)",
|
||||
"Truncate table Employee",
|
||||
"insert into Employee (employee_id, team_id) values ('1', '8')",
|
||||
"insert into Employee (employee_id, team_id) values ('2', '8')",
|
||||
"insert into Employee (employee_id, team_id) values ('3', '8')",
|
||||
"insert into Employee (employee_id, team_id) values ('4', '7')",
|
||||
"insert into Employee (employee_id, team_id) values ('5', '9')",
|
||||
"insert into Employee (employee_id, team_id) values ('6', '9')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
60
算法题/[no content]find-users-with-valid-e-mails.json
Normal file
60
算法题/[no content]find-users-with-valid-e-mails.json
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1664",
|
||||
"questionFrontendId": "1517",
|
||||
"boundTopicId": null,
|
||||
"title": "Find Users With Valid E-Mails",
|
||||
"titleSlug": "find-users-with-valid-e-mails",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Easy",
|
||||
"likes": 92,
|
||||
"dislikes": 61,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Users\":[\"user_id\",\"name\",\"mail\"]},\"rows\":{\"Users\":[[1,\"Winston\",\"winston@leetcode.com\"],[2,\"Jonathan\",\"jonathanisgreat\"],[3,\"Annabelle\",\"bella-@leetcode.com\"],[4,\"Sally\",\"sally.come@leetcode.com\"],[5,\"Marwan\",\"quarz#2020@leetcode.com\"],[6,\"David\",\"david69@gmail.com\"],[7,\"Shapiro\",\".shapo@leetcode.com\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"17.7K\", \"totalSubmission\": \"28.6K\", \"totalAcceptedRaw\": 17682, \"totalSubmissionRaw\": 28605, \"acRate\": \"61.8%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Users\":[\"user_id\",\"name\",\"mail\"]},\"rows\":{\"Users\":[[1,\"Winston\",\"winston@leetcode.com\"],[2,\"Jonathan\",\"jonathanisgreat\"],[3,\"Annabelle\",\"bella-@leetcode.com\"],[4,\"Sally\",\"sally.come@leetcode.com\"],[5,\"Marwan\",\"quarz#2020@leetcode.com\"],[6,\"David\",\"david69@gmail.com\"],[7,\"Shapiro\",\".shapo@leetcode.com\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Users (user_id int, name varchar(30), mail varchar(50))\"\n ],\n \"mssql\": [\n \"Create table Users (user_id int, name varchar(30), mail varchar(50))\"\n ],\n \"oraclesql\": [\n \"Create table Users (user_id int, name varchar(30), mail varchar(50))\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Users (user_id int, name varchar(30), mail varchar(50))",
|
||||
"Truncate table Users",
|
||||
"insert into Users (user_id, name, mail) values ('1', 'Winston', 'winston@leetcode.com')",
|
||||
"insert into Users (user_id, name, mail) values ('2', 'Jonathan', 'jonathanisgreat')",
|
||||
"insert into Users (user_id, name, mail) values ('3', 'Annabelle', 'bella-@leetcode.com')",
|
||||
"insert into Users (user_id, name, mail) values ('4', 'Sally', 'sally.come@leetcode.com')",
|
||||
"insert into Users (user_id, name, mail) values ('5', 'Marwan', 'quarz#2020@leetcode.com')",
|
||||
"insert into Users (user_id, name, mail) values ('6', 'David', 'david69@gmail.com')",
|
||||
"insert into Users (user_id, name, mail) values ('7', 'Shapiro', '.shapo@leetcode.com')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
63
算法题/[no content]finding-the-topic-of-each-post.json
Normal file
63
算法题/[no content]finding-the-topic-of-each-post.json
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "2335",
|
||||
"questionFrontendId": "2199",
|
||||
"boundTopicId": null,
|
||||
"title": "Finding the Topic of Each Post",
|
||||
"titleSlug": "finding-the-topic-of-each-post",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 7,
|
||||
"dislikes": 3,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Group Sold Products By The Date\", \"titleSlug\": \"group-sold-products-by-the-date\", \"difficulty\": \"Easy\", \"translatedTitle\": null}]",
|
||||
"exampleTestcases": "{\"headers\": {\"Keywords\": [\"topic_id\", \"word\"], \"Posts\": [\"post_id\", \"content\"]}, \"rows\": {\"Keywords\": [[1, \"handball\"], [1, \"football\"], [3, \"WAR\"], [2, \"Vaccine\"]], \"Posts\": [[1, \"We call it soccer They call it football hahaha\"], [2, \"Americans prefer basketball while Europeans love handball and football\"], [3, \"stop the war and play handball\"], [4, \"warning I planted some flowers this morning and then got vaccinated\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"215\", \"totalSubmission\": \"596\", \"totalAcceptedRaw\": 215, \"totalSubmissionRaw\": 596, \"acRate\": \"36.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"Keywords\": [\"topic_id\", \"word\"], \"Posts\": [\"post_id\", \"content\"]}, \"rows\": {\"Keywords\": [[1, \"handball\"], [1, \"football\"], [3, \"WAR\"], [2, \"Vaccine\"]], \"Posts\": [[1, \"We call it soccer They call it football hahaha\"], [2, \"Americans prefer basketball while Europeans love handball and football\"], [3, \"stop the war and play handball\"], [4, \"warning I planted some flowers this morning and then got vaccinated\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Keywords (topic_id int, word varchar(25))\",\n \"Create table If Not Exists Posts (post_id int, content varchar(100))\"\n ],\n \"mssql\": [\n \"Create table Keywords (topic_id int, word varchar(25))\",\n \"Create table Posts (post_id int, content varchar(100))\"\n ],\n \"oraclesql\": [\n \"Create table Keywords (topic_id int, word varchar(25))\",\n \"Create table Posts (post_id int, content varchar(100))\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Keywords (topic_id int, word varchar(25))",
|
||||
"Create table If Not Exists Posts (post_id int, content varchar(100))",
|
||||
"Truncate table Keywords",
|
||||
"insert into Keywords (topic_id, word) values ('1', 'handball')",
|
||||
"insert into Keywords (topic_id, word) values ('1', 'football')",
|
||||
"insert into Keywords (topic_id, word) values ('3', 'WAR')",
|
||||
"insert into Keywords (topic_id, word) values ('2', 'Vaccine')",
|
||||
"Truncate table Posts",
|
||||
"insert into Posts (post_id, content) values ('1', 'We call it soccer They call it football hahaha')",
|
||||
"insert into Posts (post_id, content) values ('2', 'Americans prefer basketball while Europeans love handball and football')",
|
||||
"insert into Posts (post_id, content) values ('3', 'stop the war and play handball')",
|
||||
"insert into Posts (post_id, content) values ('4', 'warning I planted some flowers this morning and then got vaccinated')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
59
算法题/[no content]first-and-last-call-on-the-same-day.json
Normal file
59
算法题/[no content]first-and-last-call-on-the-same-day.json
Normal file
@ -0,0 +1,59 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "2120",
|
||||
"questionFrontendId": "1972",
|
||||
"boundTopicId": null,
|
||||
"title": "First and Last Call On the Same Day",
|
||||
"titleSlug": "first-and-last-call-on-the-same-day",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 46,
|
||||
"dislikes": 8,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\": {\"Calls\": [\"caller_id\", \"recipient_id\", \"call_time\"]}, \"rows\": {\"Calls\": [[8, 4, \"2021-08-24 17:46:07\"], [4, 8, \"2021-08-24 19:57:13\"], [5, 1, \"2021-08-11 05:28:44\"], [8, 3, \"2021-08-17 04:04:15\"], [11, 3, \"2021-08-17 13:07:00\"], [8, 11, \"2021-08-17 22:22:22\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"2.7K\", \"totalSubmission\": \"5.1K\", \"totalAcceptedRaw\": 2681, \"totalSubmissionRaw\": 5146, \"acRate\": \"52.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"Calls\": [\"caller_id\", \"recipient_id\", \"call_time\"]}, \"rows\": {\"Calls\": [[8, 4, \"2021-08-24 17:46:07\"], [4, 8, \"2021-08-24 19:57:13\"], [5, 1, \"2021-08-11 05:28:44\"], [8, 3, \"2021-08-17 04:04:15\"], [11, 3, \"2021-08-17 13:07:00\"], [8, 11, \"2021-08-17 22:22:22\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Calls (caller_id int, recipient_id int, call_time datetime)\"\n ],\n \"mssql\": [\n \"Create table Calls (caller_id int, recipient_id int, call_time datetime)\"\n ],\n \"oraclesql\": [\n \"Create table Calls (caller_id int, recipient_id int, call_time date)\",\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 Calls (caller_id int, recipient_id int, call_time datetime)",
|
||||
"Truncate table Calls",
|
||||
"insert into Calls (caller_id, recipient_id, call_time) values ('8', '4', '2021-08-24 17:46:07')",
|
||||
"insert into Calls (caller_id, recipient_id, call_time) values ('4', '8', '2021-08-24 19:57:13')",
|
||||
"insert into Calls (caller_id, recipient_id, call_time) values ('5', '1', '2021-08-11 05:28:44')",
|
||||
"insert into Calls (caller_id, recipient_id, call_time) values ('8', '3', '2021-08-17 04:04:15')",
|
||||
"insert into Calls (caller_id, recipient_id, call_time) values ('11', '3', '2021-08-17 13:07:00')",
|
||||
"insert into Calls (caller_id, recipient_id, call_time) values ('8', '11', '2021-08-17 22:22:22')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
85
算法题/[no content]first-unique-number.json
Normal file
85
算法题/[no content]first-unique-number.json
Normal file
File diff suppressed because one or more lines are too long
59
算法题/[no content]fix-product-name-format.json
Normal file
59
算法题/[no content]fix-product-name-format.json
Normal file
@ -0,0 +1,59 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1686",
|
||||
"questionFrontendId": "1543",
|
||||
"boundTopicId": null,
|
||||
"title": "Fix Product Name Format",
|
||||
"titleSlug": "fix-product-name-format",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Easy",
|
||||
"likes": 54,
|
||||
"dislikes": 32,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\": {\"Sales\": [\"sale_id\", \"product_name\", \"sale_date\"]}, \"rows\": {\"Sales\": [[1, \"LCPHONE\", \"2000-01-16\"], [2, \"LCPhone\", \"2000-01-17\"], [3, \"LcPhOnE\", \"2000-02-18\"], [4, \"LCKeyCHAiN\", \"2000-02-19\"], [5, \"LCKeyChain\", \"2000-02-28\"], [6, \"Matryoshka\", \"2000-03-31\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"12.5K\", \"totalSubmission\": \"19.8K\", \"totalAcceptedRaw\": 12512, \"totalSubmissionRaw\": 19814, \"acRate\": \"63.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"Sales\": [\"sale_id\", \"product_name\", \"sale_date\"]}, \"rows\": {\"Sales\": [[1, \"LCPHONE\", \"2000-01-16\"], [2, \"LCPhone\", \"2000-01-17\"], [3, \"LcPhOnE\", \"2000-02-18\"], [4, \"LCKeyCHAiN\", \"2000-02-19\"], [5, \"LCKeyChain\", \"2000-02-28\"], [6, \"Matryoshka\", \"2000-03-31\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Sales (sale_id int, product_name varchar(30), sale_date date)\\n\"\n ],\n \"mssql\": [\n \"Create table Sales (sale_id int, product_name varchar(30), sale_date date)\\n\"\n ],\n \"oraclesql\": [\n \"Create table Sales (sale_id int, product_name varchar(30), sale_date 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 Sales (sale_id int, product_name varchar(30), sale_date date)\n",
|
||||
"Truncate table Sales",
|
||||
"insert into Sales (sale_id, product_name, sale_date) values ('1', 'LCPHONE', '2000-01-16')",
|
||||
"insert into Sales (sale_id, product_name, sale_date) values ('2', 'LCPhone', '2000-01-17')",
|
||||
"insert into Sales (sale_id, product_name, sale_date) values ('3', 'LcPhOnE', '2000-02-18')",
|
||||
"insert into Sales (sale_id, product_name, sale_date) values ('4', 'LCKeyCHAiN', '2000-02-19')",
|
||||
"insert into Sales (sale_id, product_name, sale_date) values ('5', 'LCKeyChain', '2000-02-28')",
|
||||
"insert into Sales (sale_id, product_name, sale_date) values ('6', 'Matryoshka', '2000-03-31')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
66
算法题/[no content]friendly-movies-streamed-last-month.json
Normal file
66
算法题/[no content]friendly-movies-streamed-last-month.json
Normal file
@ -0,0 +1,66 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1639",
|
||||
"questionFrontendId": "1495",
|
||||
"boundTopicId": null,
|
||||
"title": "Friendly Movies Streamed Last Month",
|
||||
"titleSlug": "friendly-movies-streamed-last-month",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Easy",
|
||||
"likes": 50,
|
||||
"dislikes": 8,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\": {\"TVProgram\": [\"program_date\", \"content_id\", \"channel\"], \"Content\": [\"content_id\", \"title\", \"Kids_content\", \"content_type\"]}, \"rows\": {\"TVProgram\": [[\"2020-06-10 08:00\", 1, \"LC-Channel\"], [\"2020-05-11 12:00\", 2, \"LC-Channel\"], [\"2020-05-12 12:00\", 3, \"LC-Channel\"], [\"2020-05-13 14:00\", 4, \"Disney Ch\"], [\"2020-06-18 14:00\", 4, \"Disney Ch\"], [\"2020-07-15 16:00\", 5, \"Disney Ch\"]], \"Content\": [[1, \"Leetcode Movie\", \"N\", \"Movies\"], [2, \"Alg. for Kids\", \"Y\", \"Series\"], [3, \"Database Sols\", \"N\", \"Series\"], [4, \"Aladdin\", \"Y\", \"Movies\"], [5, \"Cinderella\", \"Y\", \"Movies\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"17.7K\", \"totalSubmission\": \"35.2K\", \"totalAcceptedRaw\": 17714, \"totalSubmissionRaw\": 35172, \"acRate\": \"50.4%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"TVProgram\": [\"program_date\", \"content_id\", \"channel\"], \"Content\": [\"content_id\", \"title\", \"Kids_content\", \"content_type\"]}, \"rows\": {\"TVProgram\": [[\"2020-06-10 08:00\", 1, \"LC-Channel\"], [\"2020-05-11 12:00\", 2, \"LC-Channel\"], [\"2020-05-12 12:00\", 3, \"LC-Channel\"], [\"2020-05-13 14:00\", 4, \"Disney Ch\"], [\"2020-06-18 14:00\", 4, \"Disney Ch\"], [\"2020-07-15 16:00\", 5, \"Disney Ch\"]], \"Content\": [[1, \"Leetcode Movie\", \"N\", \"Movies\"], [2, \"Alg. for Kids\", \"Y\", \"Series\"], [3, \"Database Sols\", \"N\", \"Series\"], [4, \"Aladdin\", \"Y\", \"Movies\"], [5, \"Cinderella\", \"Y\", \"Movies\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists TVProgram (program_date date, content_id int, channel varchar(30))\",\n \"Create table If Not Exists Content (content_id varchar(30), title varchar(30), Kids_content ENUM('Y', 'N'), content_type varchar(30))\"\n ],\n \"mssql\": [\n \"Create table TVProgram (program_date date, content_id int, channel varchar(30))\",\n \"Create table Content (content_id varchar(30), title varchar(30), Kids_content varchar(2) NOT NULL CHECK(Kids_content IN('Y', 'N')), content_type varchar(30))\"\n ],\n \"oraclesql\": [\n \"Create table TVProgram (program_date date, content_id int, channel varchar(30))\",\n \"Create table Content (content_id varchar(30), title varchar(30), Kids_content varchar(2) NOT NULL CHECK(Kids_content IN('Y', 'N')), content_type varchar(30))\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI'\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists TVProgram (program_date date, content_id int, channel varchar(30))",
|
||||
"Create table If Not Exists Content (content_id varchar(30), title varchar(30), Kids_content ENUM('Y', 'N'), content_type varchar(30))",
|
||||
"Truncate table TVProgram",
|
||||
"insert into TVProgram (program_date, content_id, channel) values ('2020-06-10 08:00', '1', 'LC-Channel')",
|
||||
"insert into TVProgram (program_date, content_id, channel) values ('2020-05-11 12:00', '2', 'LC-Channel')",
|
||||
"insert into TVProgram (program_date, content_id, channel) values ('2020-05-12 12:00', '3', 'LC-Channel')",
|
||||
"insert into TVProgram (program_date, content_id, channel) values ('2020-05-13 14:00', '4', 'Disney Ch')",
|
||||
"insert into TVProgram (program_date, content_id, channel) values ('2020-06-18 14:00', '4', 'Disney Ch')",
|
||||
"insert into TVProgram (program_date, content_id, channel) values ('2020-07-15 16:00', '5', 'Disney Ch')",
|
||||
"Truncate table Content",
|
||||
"insert into Content (content_id, title, Kids_content, content_type) values ('1', 'Leetcode Movie', 'N', 'Movies')",
|
||||
"insert into Content (content_id, title, Kids_content, content_type) values ('2', 'Alg. for Kids', 'Y', 'Series')",
|
||||
"insert into Content (content_id, title, Kids_content, content_type) values ('3', 'Database Sols', 'N', 'Series')",
|
||||
"insert into Content (content_id, title, Kids_content, content_type) values ('4', 'Aladdin', 'Y', 'Movies')",
|
||||
"insert into Content (content_id, title, Kids_content, content_type) values ('5', 'Cinderella', 'Y', 'Movies')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
82
算法题/[no content]game-of-nim.json
Normal file
82
算法题/[no content]game-of-nim.json
Normal file
File diff suppressed because one or more lines are too long
57
算法题/[no content]get-the-second-most-recent-activity.json
Normal file
57
算法题/[no content]get-the-second-most-recent-activity.json
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1504",
|
||||
"questionFrontendId": "1369",
|
||||
"boundTopicId": null,
|
||||
"title": "Get the Second Most Recent Activity",
|
||||
"titleSlug": "get-the-second-most-recent-activity",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 101,
|
||||
"dislikes": 8,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"UserActivity\":[\"username\",\"activity\",\"startDate\",\"endDate\"]},\"rows\":{\"UserActivity\":[[\"Alice\",\"Travel\",\"2020-02-12\",\"2020-02-20\"],[\"Alice\",\"Dancing\",\"2020-02-21\",\"2020-02-23\"],[\"Alice\",\"Travel\",\"2020-02-24\",\"2020-02-28\"],[\"Bob\",\"Travel\",\"2020-02-11\",\"2020-02-18\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"12.9K\", \"totalSubmission\": \"18.7K\", \"totalAcceptedRaw\": 12877, \"totalSubmissionRaw\": 18721, \"acRate\": \"68.8%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"UserActivity\":[\"username\",\"activity\",\"startDate\",\"endDate\"]},\"rows\":{\"UserActivity\":[[\"Alice\",\"Travel\",\"2020-02-12\",\"2020-02-20\"],[\"Alice\",\"Dancing\",\"2020-02-21\",\"2020-02-23\"],[\"Alice\",\"Travel\",\"2020-02-24\",\"2020-02-28\"],[\"Bob\",\"Travel\",\"2020-02-11\",\"2020-02-18\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists UserActivity (username varchar(30), activity varchar(30), startDate date, endDate date)\"\n ],\n \"mssql\": [\n \"Create table UserActivity (username varchar(30), activity varchar(30), startDate date, endDate date)\"\n ],\n \"oraclesql\": [\n \"Create table UserActivity (username varchar(30), activity varchar(30), startDate date, endDate 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 UserActivity (username varchar(30), activity varchar(30), startDate date, endDate date)",
|
||||
"Truncate table UserActivity",
|
||||
"insert into UserActivity (username, activity, startDate, endDate) values ('Alice', 'Travel', '2020-02-12', '2020-02-20')",
|
||||
"insert into UserActivity (username, activity, startDate, endDate) values ('Alice', 'Dancing', '2020-02-21', '2020-02-23')",
|
||||
"insert into UserActivity (username, activity, startDate, endDate) values ('Alice', 'Travel', '2020-02-24', '2020-02-28')",
|
||||
"insert into UserActivity (username, activity, startDate, endDate) values ('Bob', 'Travel', '2020-02-11', '2020-02-18')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
61
算法题/[no content]grand-slam-titles.json
Normal file
61
算法题/[no content]grand-slam-titles.json
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1932",
|
||||
"questionFrontendId": "1783",
|
||||
"boundTopicId": null,
|
||||
"title": "Grand Slam Titles",
|
||||
"titleSlug": "grand-slam-titles",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 95,
|
||||
"dislikes": 2,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\": {\"Players\": [\"player_id\", \"player_name\"], \"Championships\": [\"year\", \"Wimbledon\", \"Fr_open\", \"US_open\", \"Au_open\"]}, \"rows\": {\"Players\": [[1, \"Nadal\"], [2, \"Federer\"], [3, \"Novak\"]], \"Championships\": [[2018, 1, 1, 1, 1], [2019, 1, 1, 2, 2], [2020, 2, 1, 2, 2]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"9.8K\", \"totalSubmission\": \"10.9K\", \"totalAcceptedRaw\": 9757, \"totalSubmissionRaw\": 10917, \"acRate\": \"89.4%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"Players\": [\"player_id\", \"player_name\"], \"Championships\": [\"year\", \"Wimbledon\", \"Fr_open\", \"US_open\", \"Au_open\"]}, \"rows\": {\"Players\": [[1, \"Nadal\"], [2, \"Federer\"], [3, \"Novak\"]], \"Championships\": [[2018, 1, 1, 1, 1], [2019, 1, 1, 2, 2], [2020, 2, 1, 2, 2]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Players (player_id int, player_name varchar(20))\",\n \"Create table If Not Exists Championships (year int, Wimbledon int, Fr_open int, US_open int, Au_open int)\"\n ],\n \"mssql\": [\n \"Create table Players (player_id int, player_name varchar(20))\",\n \"Create table Championships (year int, Wimbledon int, Fr_open int, US_open int, Au_open int)\"\n ],\n \"oraclesql\": [\n \"Create table Players (player_id int, player_name varchar(20))\",\n \"Create table Championships (year int, Wimbledon int, Fr_open int, US_open int, Au_open int)\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Players (player_id int, player_name varchar(20))",
|
||||
"Create table If Not Exists Championships (year int, Wimbledon int, Fr_open int, US_open int, Au_open int)",
|
||||
"Truncate table Players",
|
||||
"insert into Players (player_id, player_name) values ('1', 'Nadal')",
|
||||
"insert into Players (player_id, player_name) values ('2', 'Federer')",
|
||||
"insert into Players (player_id, player_name) values ('3', 'Novak')",
|
||||
"Truncate table Championships",
|
||||
"insert into Championships (year, Wimbledon, Fr_open, US_open, Au_open) values ('2018', '1', '1', '1', '1')",
|
||||
"insert into Championships (year, Wimbledon, Fr_open, US_open, Au_open) values ('2019', '1', '1', '2', '2')",
|
||||
"insert into Championships (year, Wimbledon, Fr_open, US_open, Au_open) values ('2020', '2', '1', '2', '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"
|
||||
}
|
||||
}
|
||||
}
|
58
算法题/[no content]group-employees-of-the-same-salary.json
Normal file
58
算法题/[no content]group-employees-of-the-same-salary.json
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "2030",
|
||||
"questionFrontendId": "1875",
|
||||
"boundTopicId": null,
|
||||
"title": "Group Employees of the Same Salary",
|
||||
"titleSlug": "group-employees-of-the-same-salary",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 36,
|
||||
"dislikes": 3,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Employees\":[\"employee_id\",\"name\",\"salary\"]},\"rows\":{\"Employees\":[[2,\"Meir\",3000],[3,\"Michael\",3000],[7,\"Addilyn\",7400],[8,\"Juan\",6100],[9,\"Kannon\",7400]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"5K\", \"totalSubmission\": \"6.6K\", \"totalAcceptedRaw\": 4981, \"totalSubmissionRaw\": 6599, \"acRate\": \"75.5%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Employees\":[\"employee_id\",\"name\",\"salary\"]},\"rows\":{\"Employees\":[[2,\"Meir\",3000],[3,\"Michael\",3000],[7,\"Addilyn\",7400],[8,\"Juan\",6100],[9,\"Kannon\",7400]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Employees (employee_id int, name varchar(30), salary int)\"\n ],\n \"mssql\": [\n \"Create table Employees (employee_id int, name varchar(30), salary int)\"\n ],\n \"oraclesql\": [\n \"Create table Employees (employee_id int, name varchar(30), salary int)\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Employees (employee_id int, name varchar(30), salary int)",
|
||||
"Truncate table Employees",
|
||||
"insert into Employees (employee_id, name, salary) values ('2', 'Meir', '3000')",
|
||||
"insert into Employees (employee_id, name, salary) values ('3', 'Michael', '3000')",
|
||||
"insert into Employees (employee_id, name, salary) values ('7', 'Addilyn', '7400')",
|
||||
"insert into Employees (employee_id, name, salary) values ('8', 'Juan', '6100')",
|
||||
"insert into Employees (employee_id, name, salary) values ('9', 'Kannon', '7400')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
64
算法题/[no content]guess-the-majority-in-a-hidden-array.json
Normal file
64
算法题/[no content]guess-the-majority-in-a-hidden-array.json
Normal file
File diff suppressed because one or more lines are too long
90
算法题/[no content]hopper-company-queries-i.json
Normal file
90
算法题/[no content]hopper-company-queries-i.json
Normal file
@ -0,0 +1,90 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1779",
|
||||
"questionFrontendId": "1635",
|
||||
"boundTopicId": null,
|
||||
"title": "Hopper Company Queries I",
|
||||
"titleSlug": "hopper-company-queries-i",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 56,
|
||||
"dislikes": 21,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Trips and Users\", \"titleSlug\": \"trips-and-users\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Hopper Company Queries II\", \"titleSlug\": \"hopper-company-queries-ii\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Hopper Company Queries III\", \"titleSlug\": \"hopper-company-queries-iii\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]",
|
||||
"exampleTestcases": "{\"headers\":{\"Drivers\":[\"driver_id\",\"join_date\"],\"Rides\":[\"ride_id\",\"user_id\",\"requested_at\"],\"AcceptedRides\":[\"ride_id\",\"driver_id\",\"ride_distance\",\"ride_duration\"]},\"rows\":{\"Drivers\":[[10,\"2019-12-10\"],[8,\"2020-1-13\"],[5,\"2020-2-16\"],[7,\"2020-3-8\"],[4,\"2020-5-17\"],[1,\"2020-10-24\"],[6,\"2021-1-5\"]],\"Rides\":[[6,75,\"2019-12-9\"],[1,54,\"2020-2-9\"],[10,63,\"2020-3-4\"],[19,39,\"2020-4-6\"],[3,41,\"2020-6-3\"],[13,52,\"2020-6-22\"],[7,69,\"2020-7-16\"],[17,70,\"2020-8-25\"],[20,81,\"2020-11-2\"],[5,57,\"2020-11-9\"],[2,42,\"2020-12-9\"],[11,68,\"2021-1-11\"],[15,32,\"2021-1-17\"],[12,11,\"2021-1-19\"],[14,18,\"2021-1-27\"]],\"AcceptedRides\":[[10,10,63,38],[13,10,73,96],[7,8,100,28],[17,7,119,68],[20,1,121,92],[5,7,42,101],[2,4,6,38],[11,8,37,43],[15,8,108,82],[12,8,38,34],[14,1,90,74]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"5K\", \"totalSubmission\": \"9.4K\", \"totalAcceptedRaw\": 5050, \"totalSubmissionRaw\": 9397, \"acRate\": \"53.7%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Drivers\":[\"driver_id\",\"join_date\"],\"Rides\":[\"ride_id\",\"user_id\",\"requested_at\"],\"AcceptedRides\":[\"ride_id\",\"driver_id\",\"ride_distance\",\"ride_duration\"]},\"rows\":{\"Drivers\":[[10,\"2019-12-10\"],[8,\"2020-1-13\"],[5,\"2020-2-16\"],[7,\"2020-3-8\"],[4,\"2020-5-17\"],[1,\"2020-10-24\"],[6,\"2021-1-5\"]],\"Rides\":[[6,75,\"2019-12-9\"],[1,54,\"2020-2-9\"],[10,63,\"2020-3-4\"],[19,39,\"2020-4-6\"],[3,41,\"2020-6-3\"],[13,52,\"2020-6-22\"],[7,69,\"2020-7-16\"],[17,70,\"2020-8-25\"],[20,81,\"2020-11-2\"],[5,57,\"2020-11-9\"],[2,42,\"2020-12-9\"],[11,68,\"2021-1-11\"],[15,32,\"2021-1-17\"],[12,11,\"2021-1-19\"],[14,18,\"2021-1-27\"]],\"AcceptedRides\":[[10,10,63,38],[13,10,73,96],[7,8,100,28],[17,7,119,68],[20,1,121,92],[5,7,42,101],[2,4,6,38],[11,8,37,43],[15,8,108,82],[12,8,38,34],[14,1,90,74]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Drivers (driver_id int, join_date date)\",\n \"Create table If Not Exists Rides (ride_id int, user_id int, requested_at date)\",\n \"Create table If Not Exists AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration int)\"\n ],\n \"mssql\": [\n \"Create table Drivers (driver_id int, join_date date)\",\n \"Create table Rides (ride_id int, user_id int, requested_at date)\",\n \"Create table AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration int)\"\n ],\n \"oraclesql\": [\n \"Create table Drivers (driver_id int, join_date date)\",\n \"Create table Rides (ride_id int, user_id int, requested_at date)\",\n \"Create table AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration 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 Drivers (driver_id int, join_date date)",
|
||||
"Create table If Not Exists Rides (ride_id int, user_id int, requested_at date)",
|
||||
"Create table If Not Exists AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration int)",
|
||||
"Truncate table Drivers",
|
||||
"insert into Drivers (driver_id, join_date) values ('10', '2019-12-10')",
|
||||
"insert into Drivers (driver_id, join_date) values ('8', '2020-1-13')",
|
||||
"insert into Drivers (driver_id, join_date) values ('5', '2020-2-16')",
|
||||
"insert into Drivers (driver_id, join_date) values ('7', '2020-3-8')",
|
||||
"insert into Drivers (driver_id, join_date) values ('4', '2020-5-17')",
|
||||
"insert into Drivers (driver_id, join_date) values ('1', '2020-10-24')",
|
||||
"insert into Drivers (driver_id, join_date) values ('6', '2021-1-5')",
|
||||
"Truncate table Rides",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('6', '75', '2019-12-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('1', '54', '2020-2-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('10', '63', '2020-3-4')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('19', '39', '2020-4-6')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('3', '41', '2020-6-3')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('13', '52', '2020-6-22')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('7', '69', '2020-7-16')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('17', '70', '2020-8-25')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('20', '81', '2020-11-2')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('5', '57', '2020-11-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('2', '42', '2020-12-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('11', '68', '2021-1-11')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('15', '32', '2021-1-17')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('12', '11', '2021-1-19')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('14', '18', '2021-1-27')",
|
||||
"Truncate table AcceptedRides",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('10', '10', '63', '38')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('13', '10', '73', '96')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('7', '8', '100', '28')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('17', '7', '119', '68')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('20', '1', '121', '92')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('5', '7', '42', '101')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('2', '4', '6', '38')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('11', '8', '37', '43')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('15', '8', '108', '82')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('12', '8', '38', '34')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('14', '1', '90', '74')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
90
算法题/[no content]hopper-company-queries-ii.json
Normal file
90
算法题/[no content]hopper-company-queries-ii.json
Normal file
@ -0,0 +1,90 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1785",
|
||||
"questionFrontendId": "1645",
|
||||
"boundTopicId": null,
|
||||
"title": "Hopper Company Queries II",
|
||||
"titleSlug": "hopper-company-queries-ii",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 35,
|
||||
"dislikes": 10,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Trips and Users\", \"titleSlug\": \"trips-and-users\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Hopper Company Queries I\", \"titleSlug\": \"hopper-company-queries-i\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Hopper Company Queries III\", \"titleSlug\": \"hopper-company-queries-iii\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]",
|
||||
"exampleTestcases": "{\"headers\":{\"Drivers\":[\"driver_id\",\"join_date\"],\"Rides\":[\"ride_id\",\"user_id\",\"requested_at\"],\"AcceptedRides\":[\"ride_id\",\"driver_id\",\"ride_distance\",\"ride_duration\"]},\"rows\":{\"Drivers\":[[10,\"2019-12-10\"],[8,\"2020-1-13\"],[5,\"2020-2-16\"],[7,\"2020-3-8\"],[4,\"2020-5-17\"],[1,\"2020-10-24\"],[6,\"2021-1-5\"]],\"Rides\":[[6,75,\"2019-12-9\"],[1,54,\"2020-2-9\"],[10,63,\"2020-3-4\"],[19,39,\"2020-4-6\"],[3,41,\"2020-6-3\"],[13,52,\"2020-6-22\"],[7,69,\"2020-7-16\"],[17,70,\"2020-8-25\"],[20,81,\"2020-11-2\"],[5,57,\"2020-11-9\"],[2,42,\"2020-12-9\"],[11,68,\"2021-1-11\"],[15,32,\"2021-1-17\"],[12,11,\"2021-1-19\"],[14,18,\"2021-1-27\"]],\"AcceptedRides\":[[10,10,63,38],[13,10,73,96],[7,8,100,28],[17,7,119,68],[20,1,121,92],[5,7,42,101],[2,4,6,38],[11,8,37,43],[15,8,108,82],[12,8,38,34],[14,1,90,74]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"3.8K\", \"totalSubmission\": \"9.8K\", \"totalAcceptedRaw\": 3808, \"totalSubmissionRaw\": 9773, \"acRate\": \"39.0%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Drivers\":[\"driver_id\",\"join_date\"],\"Rides\":[\"ride_id\",\"user_id\",\"requested_at\"],\"AcceptedRides\":[\"ride_id\",\"driver_id\",\"ride_distance\",\"ride_duration\"]},\"rows\":{\"Drivers\":[[10,\"2019-12-10\"],[8,\"2020-1-13\"],[5,\"2020-2-16\"],[7,\"2020-3-8\"],[4,\"2020-5-17\"],[1,\"2020-10-24\"],[6,\"2021-1-5\"]],\"Rides\":[[6,75,\"2019-12-9\"],[1,54,\"2020-2-9\"],[10,63,\"2020-3-4\"],[19,39,\"2020-4-6\"],[3,41,\"2020-6-3\"],[13,52,\"2020-6-22\"],[7,69,\"2020-7-16\"],[17,70,\"2020-8-25\"],[20,81,\"2020-11-2\"],[5,57,\"2020-11-9\"],[2,42,\"2020-12-9\"],[11,68,\"2021-1-11\"],[15,32,\"2021-1-17\"],[12,11,\"2021-1-19\"],[14,18,\"2021-1-27\"]],\"AcceptedRides\":[[10,10,63,38],[13,10,73,96],[7,8,100,28],[17,7,119,68],[20,1,121,92],[5,7,42,101],[2,4,6,38],[11,8,37,43],[15,8,108,82],[12,8,38,34],[14,1,90,74]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Drivers (driver_id int, join_date date)\",\n \"Create table If Not Exists Rides (ride_id int, user_id int, requested_at date)\",\n \"Create table If Not Exists AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration int)\"\n ],\n \"mssql\": [\n \"Create table Drivers (driver_id int, join_date date)\",\n \"Create table Rides (ride_id int, user_id int, requested_at date)\",\n \"Create table AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration int)\"\n ],\n \"oraclesql\": [\n \"Create table Drivers (driver_id int, join_date date)\",\n \"Create table Rides (ride_id int, user_id int, requested_at date)\",\n \"Create table AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration 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 Drivers (driver_id int, join_date date)",
|
||||
"Create table If Not Exists Rides (ride_id int, user_id int, requested_at date)",
|
||||
"Create table If Not Exists AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration int)",
|
||||
"Truncate table Drivers",
|
||||
"insert into Drivers (driver_id, join_date) values ('10', '2019-12-10')",
|
||||
"insert into Drivers (driver_id, join_date) values ('8', '2020-1-13')",
|
||||
"insert into Drivers (driver_id, join_date) values ('5', '2020-2-16')",
|
||||
"insert into Drivers (driver_id, join_date) values ('7', '2020-3-8')",
|
||||
"insert into Drivers (driver_id, join_date) values ('4', '2020-5-17')",
|
||||
"insert into Drivers (driver_id, join_date) values ('1', '2020-10-24')",
|
||||
"insert into Drivers (driver_id, join_date) values ('6', '2021-1-5')",
|
||||
"Truncate table Rides",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('6', '75', '2019-12-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('1', '54', '2020-2-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('10', '63', '2020-3-4')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('19', '39', '2020-4-6')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('3', '41', '2020-6-3')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('13', '52', '2020-6-22')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('7', '69', '2020-7-16')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('17', '70', '2020-8-25')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('20', '81', '2020-11-2')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('5', '57', '2020-11-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('2', '42', '2020-12-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('11', '68', '2021-1-11')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('15', '32', '2021-1-17')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('12', '11', '2021-1-19')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('14', '18', '2021-1-27')",
|
||||
"Truncate table AcceptedRides",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('10', '10', '63', '38')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('13', '10', '73', '96')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('7', '8', '100', '28')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('17', '7', '119', '68')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('20', '1', '121', '92')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('5', '7', '42', '101')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('2', '4', '6', '38')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('11', '8', '37', '43')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('15', '8', '108', '82')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('12', '8', '38', '34')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('14', '1', '90', '74')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
90
算法题/[no content]hopper-company-queries-iii.json
Normal file
90
算法题/[no content]hopper-company-queries-iii.json
Normal file
@ -0,0 +1,90 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1795",
|
||||
"questionFrontendId": "1651",
|
||||
"boundTopicId": null,
|
||||
"title": "Hopper Company Queries III",
|
||||
"titleSlug": "hopper-company-queries-iii",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Hard",
|
||||
"likes": 16,
|
||||
"dislikes": 39,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Trips and Users\", \"titleSlug\": \"trips-and-users\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Hopper Company Queries I\", \"titleSlug\": \"hopper-company-queries-i\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Hopper Company Queries II\", \"titleSlug\": \"hopper-company-queries-ii\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]",
|
||||
"exampleTestcases": "{\"headers\":{\"Drivers\":[\"driver_id\",\"join_date\"],\"Rides\":[\"ride_id\",\"user_id\",\"requested_at\"],\"AcceptedRides\":[\"ride_id\",\"driver_id\",\"ride_distance\",\"ride_duration\"]},\"rows\":{\"Drivers\":[[10,\"2019-12-10\"],[8,\"2020-1-13\"],[5,\"2020-2-16\"],[7,\"2020-3-8\"],[4,\"2020-5-17\"],[1,\"2020-10-24\"],[6,\"2021-1-5\"]],\"Rides\":[[6,75,\"2019-12-9\"],[1,54,\"2020-2-9\"],[10,63,\"2020-3-4\"],[19,39,\"2020-4-6\"],[3,41,\"2020-6-3\"],[13,52,\"2020-6-22\"],[7,69,\"2020-7-16\"],[17,70,\"2020-8-25\"],[20,81,\"2020-11-2\"],[5,57,\"2020-11-9\"],[2,42,\"2020-12-9\"],[11,68,\"2021-1-11\"],[15,32,\"2021-1-17\"],[12,11,\"2021-1-19\"],[14,18,\"2021-1-27\"]],\"AcceptedRides\":[[10,10,63,38],[13,10,73,96],[7,8,100,28],[17,7,119,68],[20,1,121,92],[5,7,42,101],[2,4,6,38],[11,8,37,43],[15,8,108,82],[12,8,38,34],[14,1,90,74]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"4K\", \"totalSubmission\": \"5.9K\", \"totalAcceptedRaw\": 3953, \"totalSubmissionRaw\": 5891, \"acRate\": \"67.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Drivers\":[\"driver_id\",\"join_date\"],\"Rides\":[\"ride_id\",\"user_id\",\"requested_at\"],\"AcceptedRides\":[\"ride_id\",\"driver_id\",\"ride_distance\",\"ride_duration\"]},\"rows\":{\"Drivers\":[[10,\"2019-12-10\"],[8,\"2020-1-13\"],[5,\"2020-2-16\"],[7,\"2020-3-8\"],[4,\"2020-5-17\"],[1,\"2020-10-24\"],[6,\"2021-1-5\"]],\"Rides\":[[6,75,\"2019-12-9\"],[1,54,\"2020-2-9\"],[10,63,\"2020-3-4\"],[19,39,\"2020-4-6\"],[3,41,\"2020-6-3\"],[13,52,\"2020-6-22\"],[7,69,\"2020-7-16\"],[17,70,\"2020-8-25\"],[20,81,\"2020-11-2\"],[5,57,\"2020-11-9\"],[2,42,\"2020-12-9\"],[11,68,\"2021-1-11\"],[15,32,\"2021-1-17\"],[12,11,\"2021-1-19\"],[14,18,\"2021-1-27\"]],\"AcceptedRides\":[[10,10,63,38],[13,10,73,96],[7,8,100,28],[17,7,119,68],[20,1,121,92],[5,7,42,101],[2,4,6,38],[11,8,37,43],[15,8,108,82],[12,8,38,34],[14,1,90,74]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Drivers (driver_id int, join_date date)\",\n \"Create table If Not Exists Rides (ride_id int, user_id int, requested_at date)\",\n \"Create table If Not Exists AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration int)\"\n ],\n \"mssql\": [\n \"Create table Drivers (driver_id int, join_date date)\",\n \"Create table Rides (ride_id int, user_id int, requested_at date)\",\n \"Create table AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration int)\"\n ],\n \"oraclesql\": [\n \"Create table Drivers (driver_id int, join_date date)\",\n \"Create table Rides (ride_id int, user_id int, requested_at date)\",\n \"Create table AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration 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 Drivers (driver_id int, join_date date)",
|
||||
"Create table If Not Exists Rides (ride_id int, user_id int, requested_at date)",
|
||||
"Create table If Not Exists AcceptedRides (ride_id int, driver_id int, ride_distance int, ride_duration int)",
|
||||
"Truncate table Drivers",
|
||||
"insert into Drivers (driver_id, join_date) values ('10', '2019-12-10')",
|
||||
"insert into Drivers (driver_id, join_date) values ('8', '2020-1-13')",
|
||||
"insert into Drivers (driver_id, join_date) values ('5', '2020-2-16')",
|
||||
"insert into Drivers (driver_id, join_date) values ('7', '2020-3-8')",
|
||||
"insert into Drivers (driver_id, join_date) values ('4', '2020-5-17')",
|
||||
"insert into Drivers (driver_id, join_date) values ('1', '2020-10-24')",
|
||||
"insert into Drivers (driver_id, join_date) values ('6', '2021-1-5')",
|
||||
"Truncate table Rides",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('6', '75', '2019-12-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('1', '54', '2020-2-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('10', '63', '2020-3-4')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('19', '39', '2020-4-6')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('3', '41', '2020-6-3')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('13', '52', '2020-6-22')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('7', '69', '2020-7-16')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('17', '70', '2020-8-25')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('20', '81', '2020-11-2')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('5', '57', '2020-11-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('2', '42', '2020-12-9')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('11', '68', '2021-1-11')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('15', '32', '2021-1-17')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('12', '11', '2021-1-19')",
|
||||
"insert into Rides (ride_id, user_id, requested_at) values ('14', '18', '2021-1-27')",
|
||||
"Truncate table AcceptedRides",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('10', '10', '63', '38')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('13', '10', '73', '96')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('7', '8', '100', '28')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('17', '7', '119', '68')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('20', '1', '121', '92')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('5', '7', '42', '101')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('2', '4', '6', '38')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('11', '8', '37', '43')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('15', '8', '108', '82')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('12', '8', '38', '34')",
|
||||
"insert into AcceptedRides (ride_id, driver_id, ride_distance, ride_duration) values ('14', '1', '90', '74')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
72
算法题/[no content]implement-trie-ii-prefix-tree.json
Normal file
72
算法题/[no content]implement-trie-ii-prefix-tree.json
Normal file
File diff suppressed because one or more lines are too long
55
算法题/[no content]invalid-tweets.json
Normal file
55
算法题/[no content]invalid-tweets.json
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1827",
|
||||
"questionFrontendId": "1683",
|
||||
"boundTopicId": null,
|
||||
"title": "Invalid Tweets",
|
||||
"titleSlug": "invalid-tweets",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Easy",
|
||||
"likes": 56,
|
||||
"dislikes": 66,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Tweets\":[\"tweet_id\",\"content\"]},\"rows\":{\"Tweets\":[[1,\"Vote for Biden\"],[2,\"Let us make America great again!\"]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"16.9K\", \"totalSubmission\": \"18.5K\", \"totalAcceptedRaw\": 16858, \"totalSubmissionRaw\": 18543, \"acRate\": \"90.9%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Tweets\":[\"tweet_id\",\"content\"]},\"rows\":{\"Tweets\":[[1,\"Vote for Biden\"],[2,\"Let us make America great again!\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Tweets(tweet_id int, content varchar(50))\"\n ],\n \"mssql\": [\n \"Create table Tweets(tweet_id int, content varchar(50))\"\n ],\n \"oraclesql\": [\n \"Create table Tweets(tweet_id int, content varchar(50))\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Tweets(tweet_id int, content varchar(50))",
|
||||
"Truncate table Tweets",
|
||||
"insert into Tweets (tweet_id, content) values ('1', 'Vote for Biden')",
|
||||
"insert into Tweets (tweet_id, content) values ('2', 'Let us make America great again!')"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
65
算法题/[no content]kth-smallest-subarray-sum.json
Normal file
65
算法题/[no content]kth-smallest-subarray-sum.json
Normal file
File diff suppressed because one or more lines are too long
59
算法题/[no content]largest-subarray-length-k.json
Normal file
59
算法题/[no content]largest-subarray-length-k.json
Normal file
File diff suppressed because one or more lines are too long
62
算法题/[no content]league-statistics.json
Normal file
62
算法题/[no content]league-statistics.json
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "1991",
|
||||
"questionFrontendId": "1841",
|
||||
"boundTopicId": null,
|
||||
"title": "League Statistics",
|
||||
"titleSlug": "league-statistics",
|
||||
"content": null,
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 50,
|
||||
"dislikes": 34,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\":{\"Teams\":[\"team_id\",\"team_name\"],\"Matches\":[\"home_team_id\",\"away_team_id\",\"home_team_goals\",\"away_team_goals\"]},\"rows\":{\"Teams\":[[1,\"Ajax\"],[4,\"Dortmund\"],[6,\"Arsenal\"]],\"Matches\":[[1,4,0,1],[1,6,3,3],[4,1,5,2],[6,1,0,0]]}}",
|
||||
"categoryTitle": "Database",
|
||||
"contributors": [],
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": null,
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"5.3K\", \"totalSubmission\": \"9.2K\", \"totalAcceptedRaw\": 5333, \"totalSubmissionRaw\": 9228, \"acRate\": \"57.8%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Teams\":[\"team_id\",\"team_name\"],\"Matches\":[\"home_team_id\",\"away_team_id\",\"home_team_goals\",\"away_team_goals\"]},\"rows\":{\"Teams\":[[1,\"Ajax\"],[4,\"Dortmund\"],[6,\"Arsenal\"]],\"Matches\":[[1,4,0,1],[1,6,3,3],[4,1,5,2],[6,1,0,0]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Teams (team_id int, team_name varchar(20))\",\n \"Create table If Not Exists Matches (home_team_id int, away_team_id int, home_team_goals int, away_team_goals int)\"\n ],\n \"mssql\": [\n \"Create table Teams (team_id int, team_name varchar(20))\",\n \"Create table Matches (home_team_id int, away_team_id int, home_team_goals int, away_team_goals int)\"\n ],\n \"oraclesql\": [\n \"Create table Teams (team_id int, team_name varchar(20))\",\n \"Create table Matches (home_team_id int, away_team_id int, home_team_goals int, away_team_goals int)\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Teams (team_id int, team_name varchar(20))",
|
||||
"Create table If Not Exists Matches (home_team_id int, away_team_id int, home_team_goals int, away_team_goals int)",
|
||||
"Truncate table Teams",
|
||||
"insert into Teams (team_id, team_name) values ('1', 'Ajax')",
|
||||
"insert into Teams (team_id, team_name) values ('4', 'Dortmund')",
|
||||
"insert into Teams (team_id, team_name) values ('6', 'Arsenal')",
|
||||
"Truncate table Matches",
|
||||
"insert into Matches (home_team_id, away_team_id, home_team_goals, away_team_goals) values ('1', '4', '0', '1')",
|
||||
"insert into Matches (home_team_id, away_team_id, home_team_goals, away_team_goals) values ('1', '6', '3', '3')",
|
||||
"insert into Matches (home_team_id, away_team_id, home_team_goals, away_team_goals) values ('4', '1', '5', '2')",
|
||||
"insert into Matches (home_team_id, away_team_id, home_team_goals, away_team_goals) values ('6', '1', '0', '0')"
|
||||
],
|
||||
"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
Loading…
Reference in New Issue
Block a user