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

View File

@@ -0,0 +1,71 @@
{
"data": {
"question": {
"questionId": "570",
"questionFrontendId": "570",
"boundTopicId": null,
"title": "Managers with at Least 5 Direct Reports",
"titleSlug": "managers-with-at-least-5-direct-reports",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 211,
"dislikes": 29,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "{\"headers\": {\"Employee\": [\"id\", \"name\", \"department\", \"managerId\"]}, \"rows\": {\"Employee\": [[101, \"John\", \"A\", null],[102, \"Dan\", \"A\", 101], [103, \"James\", \"A\", 101], [104, \"Amy\", \"A\", 101], [105, \"Anne\", \"A\", 101], [106, \"Ron\", \"B\", 101]]}}",
"categoryTitle": "Database",
"contributors": [],
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"55.7K\", \"totalSubmission\": \"83.3K\", \"totalAcceptedRaw\": 55734, \"totalSubmissionRaw\": 83300, \"acRate\": \"66.9%\"}",
"hints": [
"Try to get all the mangerIDs that have count bigger than 5",
"Use the last hint's result as a table and do join with origin table at id equals to managerId",
"This is a very good example to show the performance of SQL code. Try to work out other solutions and you may be surprised by running time difference.",
"If your solution uses 'IN' function and runs more than 5 seconds, try to optimize it by using 'JOIN' instead."
],
"solution": {
"id": "209",
"canSeeDetail": true,
"paidOnly": false,
"hasVideoSolution": false,
"paidOnlyVideo": true,
"__typename": "ArticleNode"
},
"status": null,
"sampleTestCase": "{\"headers\": {\"Employee\": [\"id\", \"name\", \"department\", \"managerId\"]}, \"rows\": {\"Employee\": [[101, \"John\", \"A\", null],[102, \"Dan\", \"A\", 101], [103, \"James\", \"A\", 101], [104, \"Amy\", \"A\", 101], [105, \"Anne\", \"A\", 101], [106, \"Ron\", \"B\", 101]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Employee (id int, name varchar(255), department varchar(255), managerId int)\"\n ],\n \"mssql\": [\n \"Create table Employee (id int, name varchar(255), department varchar(255), managerId int)\"\n ],\n \"oraclesql\": [\n \"Create table Employee (id int, name varchar(255), department varchar(255), managerId int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Employee (id int, name varchar(255), department varchar(255), managerId int)",
"Truncate table Employee",
"insert into Employee (id, name, department, managerId) values ('101', 'John', 'A', 'None')",
"insert into Employee (id, name, department, managerId) values ('102', 'Dan', 'A', '101')",
"insert into Employee (id, name, department, managerId) values ('103', 'James', 'A', '101')",
"insert into Employee (id, name, department, managerId) values ('104', 'Amy', 'A', '101')",
"insert into Employee (id, name, department, managerId) values ('105', 'Anne', 'A', '101')",
"insert into Employee (id, name, department, managerId) values ('106', 'Ron', 'B', '101')"
],
"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"
}
}
}