Skip to content

Commit f55b93a

Browse files
author
zhangbk1
committed
update
1 parent 4b8628b commit f55b93a

33 files changed

+10744
-6357
lines changed

Diff for: leetcode/origin-data.json

+7,231-6,357
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"data": {
3+
"question": {
4+
"questionId": "3474",
5+
"questionFrontendId": "3167",
6+
"boundTopicId": null,
7+
"title": "Better Compression of String",
8+
"titleSlug": "better-compression-of-string",
9+
"content": null,
10+
"translatedTitle": null,
11+
"translatedContent": null,
12+
"isPaidOnly": true,
13+
"difficulty": "Medium",
14+
"likes": 7,
15+
"dislikes": 1,
16+
"isLiked": null,
17+
"similarQuestions": "[{\"title\": \"String Compression\", \"titleSlug\": \"string-compression\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
18+
"exampleTestcases": "\"a3c9b2c1\"\n\"c2b3a1\"\n\"a2b4c1\"",
19+
"categoryTitle": "Algorithms",
20+
"contributors": [],
21+
"topicTags": [
22+
{
23+
"name": "Hash Table",
24+
"slug": "hash-table",
25+
"translatedName": null,
26+
"__typename": "TopicTagNode"
27+
},
28+
{
29+
"name": "String",
30+
"slug": "string",
31+
"translatedName": null,
32+
"__typename": "TopicTagNode"
33+
},
34+
{
35+
"name": "Sorting",
36+
"slug": "sorting",
37+
"translatedName": null,
38+
"__typename": "TopicTagNode"
39+
},
40+
{
41+
"name": "Counting",
42+
"slug": "counting",
43+
"translatedName": null,
44+
"__typename": "TopicTagNode"
45+
}
46+
],
47+
"companyTagStats": null,
48+
"codeSnippets": null,
49+
"stats": "{\"totalAccepted\": \"460\", \"totalSubmission\": \"539\", \"totalAcceptedRaw\": 460, \"totalSubmissionRaw\": 539, \"acRate\": \"85.3%\"}",
50+
"hints": [
51+
"This is an implementation problem.",
52+
"Try to extract each character with its corresponding frequency.",
53+
"Sum the frequencies for a single character.",
54+
"Sort characters and append them to a string in alphabetical order."
55+
],
56+
"solution": null,
57+
"status": null,
58+
"sampleTestCase": "\"a3c9b2c1\"",
59+
"metaData": "{\n \"name\": \"betterCompression\",\n \"params\": [\n {\n \"name\": \"compressed\",\n \"type\": \"string\"\n }\n ],\n \"return\": {\n \"type\": \"string\"\n }\n}",
60+
"judgerAvailable": true,
61+
"judgeType": "large",
62+
"mysqlSchemas": [],
63+
"enableRunCode": true,
64+
"enableTestMode": false,
65+
"enableDebugger": true,
66+
"envInfo": "{\"cpp\": [\"C++\", \"<p>Compiled with <code> clang 17 </code> using the latest C++ 20 standard, and <code>libstdc++</code> provided by GCC 11.</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 21</code>. Using compile arguments: <code>--enable-preview --release 21</code></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>\"], \"c\": [\"C\", \"<p>Compiled with <code>gcc 11</code> using the gnu11 standard.</p>\\r\\n\\r\\n<p>Your code is compiled with level one 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>\\r\\n\\r\\n<p>For hash table operations, you may use <a href=\\\"https://troydhanson.github.io/uthash/\\\" target=\\\"_blank\\\">uthash</a>. \\\"uthash.h\\\" is included by default. Below are some examples:</p>\\r\\n\\r\\n<p><b>1. Adding an item to a hash.</b>\\r\\n<pre>\\r\\nstruct hash_entry {\\r\\n int id; /* we'll use this field as the key */\\r\\n char name[10];\\r\\n UT_hash_handle hh; /* makes this structure hashable */\\r\\n};\\r\\n\\r\\nstruct hash_entry *users = NULL;\\r\\n\\r\\nvoid add_user(struct hash_entry *s) {\\r\\n HASH_ADD_INT(users, id, s);\\r\\n}\\r\\n</pre>\\r\\n</p>\\r\\n\\r\\n<p><b>2. Looking up an item in a hash:</b>\\r\\n<pre>\\r\\nstruct hash_entry *find_user(int user_id) {\\r\\n struct hash_entry *s;\\r\\n HASH_FIND_INT(users, &user_id, s);\\r\\n return s;\\r\\n}\\r\\n</pre>\\r\\n</p>\\r\\n\\r\\n<p><b>3. Deleting an item in a hash:</b>\\r\\n<pre>\\r\\nvoid delete_user(struct hash_entry *user) {\\r\\n HASH_DEL(users, user); \\r\\n}\\r\\n</pre>\\r\\n</p>\"], \"csharp\": [\"C#\", \"<p><a href=\\\"https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12\\\" target=\\\"_blank\\\">C# 12</a> with .NET 8 runtime</p>\"], \"javascript\": [\"JavaScript\", \"<p><code>Node.js 20.10.0</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 5.4.0 version of <a href=\\\"https://github.com/datastructures-js/priority-queue/blob/v5/README.md\\\" target=\\\"_blank\\\">datastructures-js/priority-queue</a> and 4.2.3 version of <a href=\\\"https://github.com/datastructures-js/queue/tree/v4.2.3\\\" target=\\\"_blank\\\">datastructures-js/queue</a>.</p>\"], \"ruby\": [\"Ruby\", \"<p><code>Ruby 3.2</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.9</code>.</p>\\r\\n\\r\\n<p>You may use <a href=\\\"https://github.com/apple/swift-algorithms/tree/1.2.0\\\" target=\\\"_blank\\\">swift-algorithms 1.2.0</a> and <a href=\\\"https://github.com/apple/swift-collections/tree/1.1.0\\\" target=\\\"_blank\\\">swift-collections 1.1.0</a>.</p>\"], \"golang\": [\"Go\", \"<p><code>Go 1.21</code></p>\\r\\n<p>Support <a href=\\\"https://pkg.go.dev/github.com/emirpasic/[email protected]\\\" target=\\\"_blank\\\">https://pkg.go.dev/github.com/emirpasic/[email protected]</a> and <a href=\\\"https://pkg.go.dev/github.com/emirpasic/gods/[email protected]\\\" target=\\\"_blank\\\">https://pkg.go.dev/github.com/emirpasic/gods/[email protected]</a> library.</p>\"], \"python3\": [\"Python3\", \"<p><code>Python 3.11</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 3.3.1</code>.</p>\"], \"kotlin\": [\"Kotlin\", \"<p><code>Kotlin 1.9.0</code>.</p>\\r\\n\\r\\n<p>We are using an experimental compiler provided by JetBrains.</p>\"], \"rust\": [\"Rust\", \"<p><code>Rust 1.74.1</code>. Your code will be compiled with <code>opt-level</code> 2.</p>\\r\\n\\r\\n<p>Supports <a href=\\\"https://crates.io/crates/rand\\\" target=\\\"_blank\\\">rand </a> v0.6\\u00a0from crates.io</p>\"], \"php\": [\"PHP\", \"<p><code>PHP 8.2</code>.</p>\\r\\n<p>With bcmath module</p>\"], \"typescript\": [\"Typescript\", \"<p><code>TypeScript 5.1.6, Node.js 20.10.0</code>.</p>\\r\\n\\r\\n<p>Compile Options: <code>--alwaysStrict --strictBindCallApply --strictFunctionTypes --target ES2022</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 ES2022 features</a>.</p>\\r\\n\\r\\n<p><a href=\\\"https://lodash.com\\\" target=\\\"_blank\\\">lodash.js</a> library is included by default.</p>\"], \"racket\": [\"Racket\", \"<p><a href=\\\"https://docs.racket-lang.org/guide/performance.html#%28tech._c%29\\\" target=\\\"_blank\\\">Racket CS</a> v8.11</p>\\r\\n\\r\\n<p>Using <code>#lang racket</code></p>\\r\\n\\r\\n<p>Required <code>data/gvector data/queue data/order data/heap</code> automatically for your convenience</p>\"], \"erlang\": [\"Erlang\", \"Erlang/OTP 26\"], \"elixir\": [\"Elixir\", \"Elixir 1.15 with Erlang/OTP 26\"], \"dart\": [\"Dart\", \"<p>Dart 3.2. You may use package <a href=\\\"https://pub.dev/packages/collection/versions/1.18.0\\\" target=\\\"_blank\\\">collection</a></p>\\r\\n\\r\\n<p>Your code will be run directly without compiling</p>\"]}",
67+
"libraryUrl": null,
68+
"adminUrl": null,
69+
"challengeQuestion": null,
70+
"__typename": "QuestionNode"
71+
}
72+
}
73+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"data": {
3+
"question": {
4+
"questionId": "3465",
5+
"questionFrontendId": "3156",
6+
"boundTopicId": null,
7+
"title": "Employee Task Duration and Concurrent Tasks",
8+
"titleSlug": "employee-task-duration-and-concurrent-tasks",
9+
"content": null,
10+
"translatedTitle": null,
11+
"translatedContent": null,
12+
"isPaidOnly": true,
13+
"difficulty": "Hard",
14+
"likes": 3,
15+
"dislikes": 0,
16+
"isLiked": null,
17+
"similarQuestions": "[]",
18+
"exampleTestcases": "{\"headers\":{\"Tasks\":[\"task_id\",\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"Tasks\":[[1,1001,\"2023-05-01 08:00:00\",\"2023-05-01 09:00:00\"],[2,1001,\"2023-05-01 08:30:00\",\"2023-05-01 10:30:00\"],[3,1001,\"2023-05-01 11:00:00\",\"2023-05-01 12:00:00\"],[7,1001,\"2023-05-01 13:00:00\",\"2023-05-01 15:30:00\"],[4,1002,\"2023-05-01 09:00:00\",\"2023-05-01 10:00:00\"],[5,1002,\"2023-05-01 09:30:00\",\"2023-05-01 11:30:00\"],[6,1003,\"2023-05-01 14:00:00\",\"2023-05-01 16:00:00\"]]}}",
19+
"categoryTitle": "Database",
20+
"contributors": [],
21+
"topicTags": [
22+
{
23+
"name": "Database",
24+
"slug": "database",
25+
"translatedName": null,
26+
"__typename": "TopicTagNode"
27+
}
28+
],
29+
"companyTagStats": null,
30+
"codeSnippets": null,
31+
"stats": "{\"totalAccepted\": \"217\", \"totalSubmission\": \"337\", \"totalAcceptedRaw\": 217, \"totalSubmissionRaw\": 337, \"acRate\": \"64.4%\"}",
32+
"hints": [],
33+
"solution": null,
34+
"status": null,
35+
"sampleTestCase": "{\"headers\":{\"Tasks\":[\"task_id\",\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"Tasks\":[[1,1001,\"2023-05-01 08:00:00\",\"2023-05-01 09:00:00\"],[2,1001,\"2023-05-01 08:30:00\",\"2023-05-01 10:30:00\"],[3,1001,\"2023-05-01 11:00:00\",\"2023-05-01 12:00:00\"],[7,1001,\"2023-05-01 13:00:00\",\"2023-05-01 15:30:00\"],[4,1002,\"2023-05-01 09:00:00\",\"2023-05-01 10:00:00\"],[5,1002,\"2023-05-01 09:30:00\",\"2023-05-01 11:30:00\"],[6,1003,\"2023-05-01 14:00:00\",\"2023-05-01 16:00:00\"]]}}",
36+
"metaData": "{\"mysql\": [\"CREATE TABLE if Not exists Tasks (\\n task_id INT ,\\n employee_id INT,\\n start_time DATETIME,\\n end_time DATETIME\\n);\"], \"mssql\": [\"CREATE TABLE Tasks (\\n task_id INT PRIMARY KEY,\\n employee_id INT,\\n start_time DATETIME,\\n end_time DATETIME\\n);\\n\"], \"oraclesql\": [\"CREATE TABLE Tasks (\\n task_id int ,\\n employee_id int,\\n start_time DATE,\\n end_time DATE\\n)\\n\\n\\n\\n\\n\\n\\n\", \"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"], \"postgresql\": [\"CREATE TABLE IF NOT EXISTS Tasks (\\n task_id INT,\\n employee_id INT,\\n start_time TIMESTAMP,\\n end_time TIMESTAMP\\n);\\n\"], \"pythondata\": [\"Tasks = pd.DataFrame([], columns=['task_id', 'employee_id', 'start_time', 'end_time']).astype({\\n 'task_id': 'Int64',\\n 'employee_id': 'Int64',\\n 'start_time': 'datetime64[ns]',\\n 'end_time': 'datetime64[ns]'\\n})\"], \"database\": true, \"name\": \"find_total_duration\", \"database_schema\": {\"Tasks\": {\"task_id\": \"INT\", \"employee_id\": \"INT\", \"start_time\": \"DATETIME\", \"end_time\": \"DATETIME\"}}}",
37+
"judgerAvailable": true,
38+
"judgeType": "large",
39+
"mysqlSchemas": [
40+
"CREATE TABLE if Not exists Tasks (\n task_id INT ,\n employee_id INT,\n start_time DATETIME,\n end_time DATETIME\n);",
41+
"Truncate table Tasks",
42+
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('1', '1001', '2023-05-01 08:00:00', '2023-05-01 09:00:00')",
43+
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('2', '1001', '2023-05-01 08:30:00', '2023-05-01 10:30:00')",
44+
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('3', '1001', '2023-05-01 11:00:00', '2023-05-01 12:00:00')",
45+
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('7', '1001', '2023-05-01 13:00:00', '2023-05-01 15:30:00')",
46+
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('4', '1002', '2023-05-01 09:00:00', '2023-05-01 10:00:00')",
47+
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('5', '1002', '2023-05-01 09:30:00', '2023-05-01 11:30:00')",
48+
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('6', '1003', '2023-05-01 14:00:00', '2023-05-01 16:00:00')"
49+
],
50+
"enableRunCode": true,
51+
"enableTestMode": false,
52+
"enableDebugger": false,
53+
"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>\"], \"pythondata\": [\"Pandas\", \"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0</p>\"], \"postgresql\": [\"PostgreSQL\", \"<p>PostgreSQL 16</p>\"]}",
54+
"libraryUrl": null,
55+
"adminUrl": null,
56+
"challengeQuestion": null,
57+
"__typename": "QuestionNode"
58+
}
59+
}
60+
}

0 commit comments

Comments
 (0)