1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-01 21:03:27 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

国外版

This commit is contained in:
2022-03-27 18:52:06 +08:00
parent 4a83e940d3
commit 44cb2b9989
3970 changed files with 620 additions and 621 deletions

View File

@@ -0,0 +1,30 @@
<p>Given an <code>m x n</code> binary matrix <code>mat</code>, return <em>the distance of the nearest </em><code>0</code><em> for each cell</em>.</p>
<p>The distance between two adjacent cells is <code>1</code>.</p>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/04/24/01-1-grid.jpg" style="width: 253px; height: 253px;" />
<pre>
<strong>Input:</strong> mat = [[0,0,0],[0,1,0],[0,0,0]]
<strong>Output:</strong> [[0,0,0],[0,1,0],[0,0,0]]
</pre>
<p><strong>Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/04/24/01-2-grid.jpg" style="width: 253px; height: 253px;" />
<pre>
<strong>Input:</strong> mat = [[0,0,0],[0,1,0],[1,1,1]]
<strong>Output:</strong> [[0,0,0],[0,1,0],[1,2,1]]
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>m == mat.length</code></li>
<li><code>n == mat[i].length</code></li>
<li><code>1 &lt;= m, n &lt;= 10<sup>4</sup></code></li>
<li><code>1 &lt;= m * n &lt;= 10<sup>4</sup></code></li>
<li><code>mat[i][j]</code> is either <code>0</code> or <code>1</code>.</li>
<li>There is at least one <code>0</code> in <code>mat</code>.</li>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,35 @@
<p>We have two special characters:</p>
<ul>
<li>The first character can be represented by one bit <code>0</code>.</li>
<li>The second character can be represented by two bits (<code>10</code> or <code>11</code>).</li>
</ul>
<p>Given a binary array <code>bits</code> that ends with <code>0</code>, return <code>true</code> if the last character must be a one-bit character.</p>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input:</strong> bits = [1,0,0]
<strong>Output:</strong> true
<strong>Explanation:</strong> The only way to decode it is two-bit character and one-bit character.
So the last character is one-bit character.
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input:</strong> bits = [1,1,1,0]
<strong>Output:</strong> false
<strong>Explanation:</strong> The only way to decode it is two-bit character and two-bit character.
So the last character is not one-bit character.
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 &lt;= bits.length &lt;= 1000</code></li>
<li><code>bits[i]</code> is either <code>0</code> or <code>1</code>.</li>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,37 @@
<p>Given an array&nbsp;of <code>n</code> integers <code>nums</code>, a <strong>132 pattern</strong> is a subsequence of three integers <code>nums[i]</code>, <code>nums[j]</code> and <code>nums[k]</code> such that <code>i &lt; j &lt; k</code> and <code>nums[i] &lt; nums[k] &lt; nums[j]</code>.</p>
<p>Return <em><code>true</code> if there is a <strong>132 pattern</strong> in <code>nums</code>, otherwise, return <code>false</code>.</em></p>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input:</strong> nums = [1,2,3,4]
<strong>Output:</strong> false
<strong>Explanation:</strong> There is no 132 pattern in the sequence.
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input:</strong> nums = [3,1,4,2]
<strong>Output:</strong> true
<strong>Explanation:</strong> There is a 132 pattern in the sequence: [1, 4, 2].
</pre>
<p><strong>Example 3:</strong></p>
<pre>
<strong>Input:</strong> nums = [-1,3,2,0]
<strong>Output:</strong> true
<strong>Explanation:</strong> There are three 132 patterns in the sequence: [-1, 3, 2], [-1, 3, 0] and [-1, 2, 0].
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>n == nums.length</code></li>
<li><code>1 &lt;= n &lt;= 2 * 10<sup>5</sup></code></li>
<li><code>-10<sup>9</sup> &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,34 @@
<p>There is only one character <code>&#39;A&#39;</code> on the screen of a notepad. You can perform two operations on this notepad for each step:</p>
<ul>
<li>Copy All: You can copy all the characters present on the screen (a partial copy is not allowed).</li>
<li>Paste: You can paste the characters which are copied last time.</li>
</ul>
<p>Given an integer <code>n</code>, return <em>the minimum number of operations to get the character</em> <code>&#39;A&#39;</code> <em>exactly</em> <code>n</code> <em>times on the screen</em>.</p>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input:</strong> n = 3
<strong>Output:</strong> 3
<strong>Explanation:</strong> Intitally, we have one character &#39;A&#39;.
In step 1, we use Copy All operation.
In step 2, we use Paste operation to get &#39;AA&#39;.
In step 3, we use Paste operation to get &#39;AAA&#39;.
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input:</strong> n = 1
<strong>Output:</strong> 0
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 &lt;= n &lt;= 1000</code></li>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,48 @@
<p>You are given an integer array <code>cards</code> of length <code>4</code>. You have four cards, each containing a number in the range <code>[1, 9]</code>. You should arrange the numbers on these cards in a mathematical expression using the operators <code>[&#39;+&#39;, &#39;-&#39;, &#39;*&#39;, &#39;/&#39;]</code> and the parentheses <code>&#39;(&#39;</code> and <code>&#39;)&#39;</code> to get the value 24.</p>
<p>You are restricted with the following rules:</p>
<ul>
<li>The division operator <code>&#39;/&#39;</code> represents real division, not integer division.
<ul>
<li>For example, <code>4 / (1 - 2 / 3) = 4 / (1 / 3) = 12</code>.</li>
</ul>
</li>
<li>Every operation done is between two numbers. In particular, we cannot use <code>&#39;-&#39;</code> as a unary operator.
<ul>
<li>For example, if <code>cards = [1, 1, 1, 1]</code>, the expression <code>&quot;-1 - 1 - 1 - 1&quot;</code> is <strong>not allowed</strong>.</li>
</ul>
</li>
<li>You cannot concatenate numbers together
<ul>
<li>For example, if <code>cards = [1, 2, 1, 2]</code>, the expression <code>&quot;12 + 12&quot;</code> is not valid.</li>
</ul>
</li>
</ul>
<p>Return <code>true</code> if you can get such expression that evaluates to <code>24</code>, and <code>false</code> otherwise.</p>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input:</strong> cards = [4,1,8,7]
<strong>Output:</strong> true
<strong>Explanation:</strong> (8-4) * (7-1) = 24
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input:</strong> cards = [1,2,1,2]
<strong>Output:</strong> false
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>cards.length == 4</code></li>
<li><code>1 &lt;= cards[i] &lt;= 9</code></li>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,30 @@
<p>Given an integer array <code>nums</code> of length <code>n</code> and an integer <code>target</code>, find three integers in <code>nums</code> such that the sum is closest to <code>target</code>.</p>
<p>Return <em>the sum of the three integers</em>.</p>
<p>You may assume that each input would have exactly one solution.</p>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input:</strong> nums = [-1,2,1,-4], target = 1
<strong>Output:</strong> 2
<strong>Explanation:</strong> The sum that is closest to the target is 2. (-1 + 2 + 1 = 2).
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input:</strong> nums = [0,0,0], target = 1
<strong>Output:</strong> 0
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>3 &lt;= nums.length &lt;= 1000</code></li>
<li><code>-1000 &lt;= nums[i] &lt;= 1000</code></li>
<li><code>-10<sup>4</sup> &lt;= target &lt;= 10<sup>4</sup></code></li>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,37 @@
<p>Given an integer array <code>arr</code>, and an integer <code>target</code>, return the number of tuples <code>i, j, k</code> such that <code>i &lt; j &lt; k</code> and <code>arr[i] + arr[j] + arr[k] == target</code>.</p>
<p>As the answer can be very large, return it <strong>modulo</strong> <code>10<sup>9</sup> + 7</code>.</p>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input:</strong> arr = [1,1,2,2,3,3,4,4,5,5], target = 8
<strong>Output:</strong> 20
<strong>Explanation: </strong>
Enumerating by the values (arr[i], arr[j], arr[k]):
(1, 2, 5) occurs 8 times;
(1, 3, 4) occurs 8 times;
(2, 2, 4) occurs 2 times;
(2, 3, 3) occurs 2 times.
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input:</strong> arr = [1,1,2,2,2,2], target = 5
<strong>Output:</strong> 12
<strong>Explanation: </strong>
arr[i] = 1, arr[j] = arr[k] = 2 occurs 12 times:
We choose one 1 from [1,1] in 2 ways,
and two 2s from [2,2,2,2] in 6 ways.
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>3 &lt;= arr.length &lt;= 3000</code></li>
<li><code>0 &lt;= arr[i] &lt;= 100</code></li>
<li><code>0 &lt;= target &lt;= 300</code></li>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,22 @@
<p>Given an integer array nums, return all the triplets <code>[nums[i], nums[j], nums[k]]</code> such that <code>i != j</code>, <code>i != k</code>, and <code>j != k</code>, and <code>nums[i] + nums[j] + nums[k] == 0</code>.</p>
<p>Notice that the solution set must not contain duplicate triplets.</p>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<pre><strong>Input:</strong> nums = [-1,0,1,2,-1,-4]
<strong>Output:</strong> [[-1,-1,2],[-1,0,1]]
</pre><p><strong>Example 2:</strong></p>
<pre><strong>Input:</strong> nums = []
<strong>Output:</strong> []
</pre><p><strong>Example 3:</strong></p>
<pre><strong>Input:</strong> nums = [0]
<strong>Output:</strong> []
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>0 &lt;= nums.length &lt;= 3000</code></li>
<li><code>-10<sup>5</sup> &lt;= nums[i] &lt;= 10<sup>5</sup></code></li>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,37 @@
<p>Given four integer arrays <code>nums1</code>, <code>nums2</code>, <code>nums3</code>, and <code>nums4</code> all of length <code>n</code>, return the number of tuples <code>(i, j, k, l)</code> such that:</p>
<ul>
<li><code>0 &lt;= i, j, k, l &lt; n</code></li>
<li><code>nums1[i] + nums2[j] + nums3[k] + nums4[l] == 0</code></li>
</ul>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input:</strong> nums1 = [1,2], nums2 = [-2,-1], nums3 = [-1,2], nums4 = [0,2]
<strong>Output:</strong> 2
<strong>Explanation:</strong>
The two tuples are:
1. (0, 0, 0, 1) -&gt; nums1[0] + nums2[0] + nums3[0] + nums4[1] = 1 + (-2) + (-1) + 2 = 0
2. (1, 1, 0, 0) -&gt; nums1[1] + nums2[1] + nums3[0] + nums4[0] = 2 + (-1) + (-1) + 0 = 0
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input:</strong> nums1 = [0], nums2 = [0], nums3 = [0], nums4 = [0]
<strong>Output:</strong> 1
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>n == nums1.length</code></li>
<li><code>n == nums2.length</code></li>
<li><code>n == nums3.length</code></li>
<li><code>n == nums4.length</code></li>
<li><code>1 &lt;= n &lt;= 200</code></li>
<li><code>-2<sup>28</sup> &lt;= nums1[i], nums2[i], nums3[i], nums4[i] &lt;= 2<sup>28</sup></code></li>
</ul>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,33 @@
<p>Given an array <code>nums</code> of <code>n</code> integers, return <em>an array of all the <strong>unique</strong> quadruplets</em> <code>[nums[a], nums[b], nums[c], nums[d]]</code> such that:</p>
<ul>
<li><code>0 &lt;= a, b, c, d&nbsp;&lt; n</code></li>
<li><code>a</code>, <code>b</code>, <code>c</code>, and <code>d</code> are <strong>distinct</strong>.</li>
<li><code>nums[a] + nums[b] + nums[c] + nums[d] == target</code></li>
</ul>
<p>You may return the answer in <strong>any order</strong>.</p>
<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input:</strong> nums = [1,0,-1,0,-2,2], target = 0
<strong>Output:</strong> [[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]]
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input:</strong> nums = [2,2,2,2,2], target = 8
<strong>Output:</strong> [[2,2,2,2]]
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 &lt;= nums.length &lt;= 200</code></li>
<li><code>-10<sup>9</sup> &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>
<li><code>-10<sup>9</sup> &lt;= target &lt;= 10<sup>9</sup></code></li>
</ul>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because one or more lines are too long

View File

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

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

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

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

View File

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

View File

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

View File

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

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

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

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

View File

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

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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