2022-03-27 20:38:29 +08:00
{
"data" : {
"question" : {
"questionId" : "2197" ,
"questionFrontendId" : "2075" ,
"categoryTitle" : "Algorithms" ,
"boundTopicId" : 1097256 ,
"title" : "Decode the Slanted Ciphertext" ,
"titleSlug" : "decode-the-slanted-ciphertext" ,
2023-12-09 18:42:21 +08:00
"content" : "<p>A string <code>originalText</code> is encoded using a <strong>slanted transposition cipher</strong> to a string <code>encodedText</code> with the help of a matrix having a <strong>fixed number of rows</strong> <code>rows</code>.</p>\n\n<p><code>originalText</code> is placed first in a top-left to bottom-right manner.</p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/11/07/exa11.png\" style=\"width: 300px; height: 185px;\" />\n<p>The blue cells are filled first, followed by the red cells, then the yellow cells, and so on, until we reach the end of <code>originalText</code>. The arrow indicates the order in which the cells are filled. All empty cells are filled with <code>' '</code>. The number of columns is chosen such that the rightmost column will <strong>not be empty</strong> after filling in <code>originalText</code>.</p>\n\n<p><code>encodedText</code> is then formed by appending all characters of the matrix in a row-wise fashion.</p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/11/07/exa12.png\" style=\"width: 300px; height: 200px;\" />\n<p>The characters in the blue cells are appended first to <code>encodedText</code>, then the red cells, and so on, and finally the yellow cells. The arrow indicates the order in which the cells are accessed.</p>\n\n<p>For example, if <code>originalText = "cipher"</code> and <code>rows = 3</code>, then we encode it in the following manner:</p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/10/25/desc2.png\" style=\"width: 281px; height: 211px;\" />\n<p>The blue arrows depict how <code>originalText</code> is placed in the matrix, and the red arrows denote the order in which <code>encodedText</code> is formed. In the above example, <code>encodedText = "ch ie pr"</code>.</p>\n\n<p>Given the encoded string <code>encodedText</code> and number of rows <code>rows</code>, return <em>the original string</em> <code>originalText</code>.</p>\n\n<p><strong>Note:</strong> <code>originalText</code> <strong>does not</strong> have any trailing spaces <code>' '</code>. The test cases are generated such that there is only one possible <code>originalText</code>.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> encodedText = "ch ie pr", rows = 3\n<strong>Output:</strong> "cipher"\n<strong>Explanation:</strong> This is the same example described in the problem description.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/10/26/exam1.png\" style=\"width: 250px; height: 168px;\" />\n<pre>\n<strong>Input:</strong> encodedText = "iveo eed l te olc", rows = 4\n<strong>Output:</strong> "i love leetcode"\n<strong>Explanation:</strong> The figure above denotes the matrix that was used to encode originalText. \nThe blue arrows show how we can find originalText from encodedText.\n</pre>\n\n<p><strong class=\"example\">Example 3:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/10/26/eg2.png\" style=\"width: 300px; height: 51px;\" />\n<pre>\n<strong>Input:</strong> encodedText = "coding", rows = 1\n<strong>Output:</strong> "coding"\n<strong>Explanation:</strong> Since there is only 1 row, both originalText and encodedText are the same.\n</pre>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>0 <= encodedText.length <= 10<sup>6</sup></code></li>\n\t<li><code>encodedText</code> consists of lowercase English letters and <code>' '</code> only.</li>\n\t<li><code>encodedText</code> is a valid encoding of some <code>originalText</code> that <strong>does not</strong> have trailing spaces.</li>\n\t<li><code>1 <= rows <= 1000</code></li>\n\t<li>The testcases are generated such that there is <strong>only one</strong> possible <code>originalText</code>.</li>\n</ul>\n" ,
2022-03-27 20:38:29 +08:00
"translatedTitle" : "解码斜向换位密码" ,
"translatedContent" : "<p>字符串 <code>originalText</code> 使用 <strong>斜向换位密码</strong> ,经由 <strong>行数固定</strong> 为 <code>rows</code> 的矩阵辅助,加密得到一个字符串 <code>encodedText</code> 。</p>\n\n<p><code>originalText</code> 先按从左上到右下的方式放置到矩阵中。</p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/11/07/exa11.png\" style=\"width: 300px; height: 185px;\" />\n<p>先填充蓝色单元格,接着是红色单元格,然后是黄色单元格,以此类推,直到到达 <code>originalText</code> 末尾。箭头指示顺序即为单元格填充顺序。所有空单元格用 <code>' '</code> 进行填充。矩阵的列数需满足:用 <code>originalText</code> 填充之后,最右侧列 <strong>不为空</strong> 。</p>\n\n<p>接着按行将字符附加到矩阵中,构造 <code>encodedText</code> 。</p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/11/07/exa12.png\" style=\"width: 300px; height: 200px;\" />\n<p>先把蓝色单元格中的字符附加到 <code>encodedText</code> 中,接着是红色单元格,最后是黄色单元格。箭头指示单元格访问顺序。</p>\n\n<p>例如,如果 <code>originalText = \"cipher\"</code> 且 <code>rows = 3</code> ,那么我们可以按下述方法将其编码:</p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/10/25/desc2.png\" style=\"width: 281px; height: 211px;\" />\n<p>蓝色箭头标识 <code>originalText</code> 是如何放入矩阵中的,红色箭头标识形成 <code>encodedText</code> 的顺序。在上述例子中,<code>encodedText = \"ch ie pr\"</code> 。</p>\n\n<p>给你编码后的字符串 <code>encodedText</code> 和矩阵的行数 <code>rows</code> ,返回源字符串 <code>originalText</code> 。</p>\n\n<p><strong>注意:</strong><code>originalText</code> <strong>不</strong> 含任何尾随空格 <code>' '</code> 。生成的测试用例满足 <strong>仅存在一个</strong> 可能的 <code>originalText</code> 。</p>\n\n<p> </p>\n\n<p><strong>示例 1: </strong></p>\n\n<pre>\n<strong>输入:</strong>encodedText = \"ch ie pr\", rows = 3\n<strong>输出:</strong>\"cipher\"\n<strong>解释:</strong>此示例与问题描述中的例子相同。\n</pre>\n\n<p><strong>示例 2: </strong></p>\n\n<p><img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/10/26/exam1.png\" style=\"width: 250px; height: 168px;\" /></p>\n\n<pre>\n<strong>输入:</strong>encodedText = \"iveo eed l te olc\", rows = 4\n<strong>输出:</strong>\"i love leetcode\"\n<strong>解释:</strong>上图标识用于编码 originalText 的矩阵。 \n蓝色箭头展示如何从 encodedText 找到 originalText 。\n</pre>\n\n<p><strong>示例 3: </strong></p>\n\n<p><img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/10/26/eg2.png\" style=\"width: 300px; height: 51px;\" /></p>\n\n<pre>\n<strong>输入:</strong>encodedText = \"coding\", rows = 1\n<strong>输出:</strong>\"coding\"\n<strong>解释:</strong>由于只有 1 行,所以 originalText 和 encodedText 是相同的。\n</pre>\n\n<p><strong>示例 4: </strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/10/26/exam3.png\" style=\"width: 150px; height: 101px;\" />\n<pre>\n<strong>输入:</strong>encodedText = \" b ac\", rows = 2\n<strong>输出:</strong>\" abc\" \ n < s t r o n g > 解 释 : < / s t r o n g > o r i g i n a l T e x t 不 能 含 尾 随 空 格 , 但 它 可 能 会 有 一 个 或 者 多 个 前 置 空 格 。 \ n < / p r e > \ n \ n < p > & n b s p ; < / p > \ n \ n < p > < s t r o n g > 提 示 : < / s t r o n g > < / p > \ n \ n < u l > \ n \ t < l i > < c o d e > 0 & l t ; = e n c o d e d T e x t . l e n g t h & l t ; = 10 < s u p > 6 < / s u p > < / c o d e > < / l i > \ n \ t < l i > < c o d e > e n c o d e d T e x t < / c o d e > 仅 由 小 写 英 文 字 母 和 < c o d e > ' ' < / c o d e > 组 成 < / l i > \ n \ t < l i > < c o d e > e n c o d e d T e x t < / c o d e > 是 对 某 个 < s t r o n g > 不 含 < / s t r o n g > 尾 随 空 格 的 < c o d e > o r i g i n a l T e x t < / c o d e > 的 一 个 有 效 编 码 < / l i > \ n \ t < l i > < c o d e > 1 & l t ; = r o w s & l t ; = 1000 < / c o d e > < / l i > \ n \ t < l i > 生 成 的 测 试 用 例 满 足 < s t r o n g > 仅 存 在 一 个 < / s t r o n g > 可 能 的 < c o d e > o r i g i n a l T e x
"isPaidOnly" : false ,
"difficulty" : "Medium" ,
2023-12-09 18:42:21 +08:00
"likes" : 11 ,
2022-03-27 20:38:29 +08:00
"dislikes" : 0 ,
"isLiked" : null ,
"similarQuestions" : "[]" ,
"contributors" : [ ] ,
2023-12-09 18:42:21 +08:00
"langToValidPlayground" : "{\"cpp\": true, \"java\": true, \"python\": true, \"python3\": true, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false}" ,
2022-03-27 20:38:29 +08:00
"topicTags" : [
{
"name" : "String" ,
"slug" : "string" ,
"translatedName" : "字符串" ,
"__typename" : "TopicTagNode"
} ,
{
"name" : "Simulation" ,
"slug" : "simulation" ,
"translatedName" : "模拟" ,
"__typename" : "TopicTagNode"
}
] ,
"companyTagStats" : null ,
"codeSnippets" : [
{
"lang" : "C++" ,
"langSlug" : "cpp" ,
"code" : "class Solution {\npublic:\n string decodeCiphertext(string encodedText, int rows) {\n \n }\n};" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Java" ,
"langSlug" : "java" ,
"code" : "class Solution {\n public String decodeCiphertext(String encodedText, int rows) {\n\n }\n}" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Python" ,
"langSlug" : "python" ,
"code" : "class Solution(object):\n def decodeCiphertext(self, encodedText, rows):\n \"\"\"\n :type encodedText: str\n :type rows: int\n :rtype: str\n \"\"\"" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Python3" ,
"langSlug" : "python3" ,
"code" : "class Solution:\n def decodeCiphertext(self, encodedText: str, rows: int) -> str:" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "C" ,
"langSlug" : "c" ,
2023-12-09 18:42:21 +08:00
"code" : "char* decodeCiphertext(char* encodedText, int rows) {\n \n}" ,
2022-03-27 20:38:29 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "C#" ,
"langSlug" : "csharp" ,
"code" : "public class Solution {\n public string DecodeCiphertext(string encodedText, int rows) {\n\n }\n}" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "JavaScript" ,
"langSlug" : "javascript" ,
"code" : "/**\n * @param {string} encodedText\n * @param {number} rows\n * @return {string}\n */\nvar decodeCiphertext = function(encodedText, rows) {\n\n};" ,
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "TypeScript" ,
"langSlug" : "typescript" ,
"code" : "function decodeCiphertext(encodedText: string, rows: number): string {\n \n};" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "PHP" ,
"langSlug" : "php" ,
"code" : "class Solution {\n\n /**\n * @param String $encodedText\n * @param Integer $rows\n * @return String\n */\n function decodeCiphertext($encodedText, $rows) {\n\n }\n}" ,
2022-03-27 20:38:29 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Swift" ,
"langSlug" : "swift" ,
"code" : "class Solution {\n func decodeCiphertext(_ encodedText: String, _ rows: Int) -> String {\n\n }\n}" ,
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Kotlin" ,
"langSlug" : "kotlin" ,
"code" : "class Solution {\n fun decodeCiphertext(encodedText: String, rows: Int): String {\n\n }\n}" ,
2022-03-27 20:38:29 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Dart" ,
"langSlug" : "dart" ,
"code" : "class Solution {\n String decodeCiphertext(String encodedText, int rows) {\n \n }\n}" ,
2022-03-27 20:38:29 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Go" ,
"langSlug" : "golang" ,
"code" : "func decodeCiphertext(encodedText string, rows int) string {\n\n}" ,
2022-03-27 20:38:29 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Ruby" ,
"langSlug" : "ruby" ,
"code" : "# @param {String} encoded_text\n# @param {Integer} rows\n# @return {String}\ndef decode_ciphertext(encoded_text, rows)\n\nend" ,
2022-03-27 20:38:29 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Scala" ,
"langSlug" : "scala" ,
"code" : "object Solution {\n def decodeCiphertext(encodedText: String, rows: Int): String = {\n\n }\n}" ,
2022-03-27 20:38:29 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Rust" ,
"langSlug" : "rust" ,
"code" : "impl Solution {\n pub fn decode_ciphertext(encoded_text: String, rows: i32) -> String {\n\n }\n}" ,
2022-03-27 20:38:29 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Racket" ,
"langSlug" : "racket" ,
2023-12-09 18:42:21 +08:00
"code" : "(define/contract (decode-ciphertext encodedText rows)\n (-> string? exact-integer? string?)\n )" ,
2022-03-27 20:38:29 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Erlang" ,
"langSlug" : "erlang" ,
"code" : "-spec decode_ciphertext(EncodedText :: unicode:unicode_binary(), Rows :: integer()) -> unicode:unicode_binary().\ndecode_ciphertext(EncodedText, Rows) ->\n ." ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Elixir" ,
"langSlug" : "elixir" ,
2023-12-09 18:42:21 +08:00
"code" : "defmodule Solution do\n @spec decode_ciphertext(encoded_text :: String.t, rows :: integer) :: String.t\n def decode_ciphertext(encoded_text, rows) do\n \n end\nend" ,
2022-03-27 20:38:29 +08:00
"__typename" : "CodeSnippetNode"
}
] ,
2023-12-09 19:57:46 +08:00
"stats" : "{\"totalAccepted\": \"5K\", \"totalSubmission\": \"10.5K\", \"totalAcceptedRaw\": 4957, \"totalSubmissionRaw\": 10461, \"acRate\": \"47.4%\"}" ,
2022-03-27 20:38:29 +08:00
"hints" : [
"How can you use rows and encodedText to find the number of columns of the matrix?" ,
"Once you have the number of rows and columns, you can create the matrix and place encodedText in it. How should you place it in the matrix?" ,
"How should you traverse the matrix to \"decode\" originalText?"
] ,
"solution" : null ,
"status" : null ,
"sampleTestCase" : "\"ch ie pr\"\n3" ,
"metaData" : "{\n \"name\": \"decodeCiphertext\",\n \"params\": [\n {\n \"name\": \"encodedText\",\n \"type\": \"string\"\n },\n {\n \"type\": \"integer\",\n \"name\": \"rows\"\n }\n ],\n \"return\": {\n \"type\": \"string\"\n }\n}" ,
"judgerAvailable" : true ,
"judgeType" : "large" ,
"mysqlSchemas" : [ ] ,
"enableRunCode" : true ,
2023-12-09 18:42:21 +08:00
"envInfo" : " { \ " c p p \ " : [ \ " C + + \ " , \ " < p > \ \ u 7 2 4 8 \ \ u 6 7 2 c \ \ u f f 1 a < c o d e > c l a n g 1 1 < \ \ / c o d e > \ \ u 9 1 c 7 \ \ u 7 5 2 8 \ \ u 6 7 0 0 \ \ u 6 5 b 0 C + + 2 0 \ \ u 6 8 0 7 \ \ u 5 1 c 6 \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 7 f 1 6 \ \ u 8 b d 1 \ \ u 6 5 f 6 \ \ u f f 0 c \ \ u 5 c 0 6 \ \ u 4 f 1 a \ \ u 9 1 c 7 \ \ u 7 5 2 8 < c o d e > - O 2 < \ \ / c o d e > \ \ u 7 e a 7 \ \ u 4 f 1 8 \ \ u 5 3 1 6 \ \ u 3 0 0 2 < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / g i t h u b . c o m \ \ / g o o g l e \ \ / s a n i t i z e r s \ \ / w i k i \ \ / A d d r e s s S a n i t i z e r \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > A d d r e s s S a n i t i z e r < \ \ / a > \ \ u 4 e 5 f \ \ u 8 8 a b \ \ u 5 f 0 0 \ \ u 5 4 2 f \ \ u 6 7 6 5 \ \ u 6 8 c 0 \ \ u 6 d 4 b < c o d e > o u t - o f - b o u n d s < \ \ / c o d e > \ \ u 5 4 8 c < c o d e > u s e - a f t e r - f r e e < \ \ / c o d e > \ \ u 9 5 1 9 \ \ u 8 b e f \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 4 e 3 a \ \ u 4 e 8 6 \ \ u 4 f 7 f \ \ u 7 5 2 8 \ \ u 6 5 b 9 \ \ u 4 f b f \ \ u f f 0 c \ \ u 5 9 2 7 \ \ u 9 0 e 8 \ \ u 5 2 0 6 \ \ u 6 8 0 7 \ \ u 5 1 c 6 \ \ u 5 e 9 3 \ \ u 7 6 8 4 \ \ u 5 9 3 4 \ \ u 6 5 8 7 \ \ u 4 e f 6 \ \ u 5 d f 2 \ \ u 7 e c f \ \ u 8 8 a b \ \ u 8 1 e a \ \ u 5 2 a 8 \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u 3 0 0 2 < \ \ / p > \ " ] , \ " j a v a \ " : [ \ " J a v a \ " , \ " < p > \ \ u 7 2 4 8 \ \ u 6 7 2 c \ \ u f f 1 a < c o d e > O p e n J D K 1 7 < \ \ / c o d e > \ \ u 3 0 0 2 \ \ u 5 3 e f \ \ u 4 e e 5 \ \ u 4 f 7 f \ \ u 7 5 2 8 J a v a 8 \ \ u 7 6 8 4 \ \ u 7 2 7 9 \ \ u 6 0 2 7 \ \ u 4 f 8 b \ \ u 5 9 8 2 \ \ u f f 0 c l a m b d a e x p r e s s i o n s \ \ u 5 4 8 c s t r e a m A P I \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 4 e 3 a \ \ u 4 e 8 6 \ \ u 6 5 b 9 \ \ u 4 f b f \ \ u 8 d 7 7 \ \ u 8 9 c 1 \ \ u f f 0 c \ \ u 5 9 2 7 \ \ u 9 0 e 8 \ \ u 5 2 0 6 \ \ u 6 8 0 7 \ \ u 5 1 c 6 \ \ u 5 e 9 3 \ \ u 7 6 8 4 \ \ u 5 9 3 4 \ \ u 6 5 8 7 \ \ u 4 e f 6 \ \ u 5 d f 2 \ \ u 8 8 a b \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 5 3 0 5 \ \ u 5 4 2 b P a i r \ \ u 7 c 7 b : h t t p s : \ \ / \ \ / d o c s . o r a c l e . c o m \ \ / j a v a s e \ \ / 8 \ \ / j a v a f x \ \ / a p i \ \ / j a v a f x \ \ / u t i l \ \ / P a i r . h t m l < \ \ / p > \ " ] , \ " p y t h o n \ " : [ \ " P y t h o n \ " , \ " < p > \ \ u 7 2 4 8 \ \ u 6 7 2 c \ \ u f f 1 a < c o d e > P y t h o n 2 . 7 . 1 2 < \ \ / c o d e > < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 4 e 3 a \ \ u 4 e 8 6 \ \ u 6 5 b 9 \ \ u 4 f b f \ \ u 8 d 7 7 \ \ u 8 9 c 1 \ \ u f f 0 c \ \ u 5 9 2 7 \ \ u 9 0 e 8 \ \ u 5 2 0 6 \ \ u 5 e 3 8 \ \ u 7 5 2 8 \ \ u 5 e 9 3 \ \ u 5 d f 2 \ \ u 7 e c f \ \ u 8 8 a b \ \ u 8 1 e a \ \ u 5 2 a 8 \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u f f 0 c \ \ u 5 9 8 2 \ \ u f f 1 a < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / d o c s . p y t h o n . o r g \ \ / 2 \ \ / l i b r a r y \ \ / a r r a y . h t m l \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > a r r a y < \ \ / a > , < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / d o c s . p y t h o n . o r g \ \ / 2 \ \ / l i b r a r y \ \ / b i s e c t . h t m l \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > b i s e c t < \ \ / a > , < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / d o c s . p y t h o n . o r g \ \ / 2 \ \ / l i b r a r y \ \ / c o l l e c t i o n s . h t m l \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > c o l l e c t i o n s < \ \ / a > \ \ u 3 0 0 2 \ \ u 5 9 8 2 \ \ u 6 7 9 c \ \ u 6 0 a 8 \ \ u 9 7 0 0 \ \ u 8 9 8 1 \ \ u 4 f 7 f \ \ u 7 5 2 8 \ \ u 5 1 7 6 \ \ u 4 e d 6 \ \ u 5 e 9 3 \ \ u 5 1 f d \ \ u 6 5 7 0 \ \ u f f 0 c \ \ u 8 b f 7 \ \ u 8 1 e a \ \ u 8 8 4 c \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 6 c e 8 \ \ u 6 1 0 f P y t h o n 2 . 7 < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / w w w . p y t h o n . o r g \ \ / d e v \ \ / p e p s \ \ / p e p - 0 3 7 3 \ \ / \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > \ \ u 5 c 0 6 \ \ u 5 7 2 8 2 0 2 0 \ \ u 5 e 7 4 \ \ u 5 4 0 e \ \ u 4 e 0 d \ \ u 5 1 8 d \ \ u 7 e f 4 \ \ u 6 2 a 4 < \ \ / a > \ \ u 3 0 0 2 \ \ u 5 9 8 2 \ \ u 6 0 f 3 \ \ u 4 f 7 f \ \ u 7 5 2 8 \ \ u 6 7 0 0 \ \ u 6 5 b 0 \ \ u 7 2 4 8 \ \ u 7 6 8 4 P y t h o n \ \ u f f 0 c \ \ u 8 b f 7 \ \ u 9 0 0 9 \ \ u 6 2 e 9 P y t h o n 3 \ \ u 3 0 0 2 < \ \ / p > \ " ] , \ " c \ " : [ \ " C \ " , \ " < p > \ \ u 7 2 4 8 \ \ u 6 7 2 c \ \ u f f 1 a < c o d e > G C C 8 . 2 < \ \ / c o d e > \ \ u f f 0 c \ \ u 9 1 c 7 \ \ u 7 5 2 8 G N U 1 1 \ \ u 6 8 0 7 \ \ u 5 1 c 6 \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 7 f 1 6 \ \ u 8 b d 1 \ \ u 6 5 f 6 \ \ u f f 0 c \ \ u 5 c 0 6 \ \ u 4 f 1 a \ \ u 9 1 c 7 \ \ u 7 5 2 8 < c o d e > - O 1 < \ \ / c o d e > \ \ u 7 e a 7 \ \ u 4 f 1 8 \ \ u 5 3 1 6 \ \ u 3 0 0 2 < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / g i t h u b . c o m \ \ / g o o g l e \ \ / s a n i t i z e r s \ \ / w i k i \ \ / A d d r e s s S a n i t i z e r \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > A d d r e s s S a n i t i z e r < \ \ / a > \ \ u 4 e 5 f \ \ u 8 8 a b \ \ u 5 f 0 0 \ \ u 5 4 2 f \ \ u 6 7 6 5 \ \ u 6 8 c 0 \ \ u 6 d 4 b < c o d e > o u t - o f - b o u n d s < \ \ / c o d e > \ \ u 5 4 8 c < c o d e > u s e - a f t e r - f r e e < \ \ / c o d e > \ \ u 9 5 1 9 \ \ u 8 b e f \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 4 e 3 a \ \ u 4 e 8 6 \ \ u 4 f 7 f \ \ u 7 5 2 8 \ \ u 6 5 b 9 \ \ u 4 f b f \ \ u f f 0 c \ \ u 5 9 2 7 \ \ u 9 0 e 8 \ \ u 5 2 0 6 \ \ u 6 8 0 7 \ \ u 5 1 c 6 \ \ u 5 e 9 3 \ \ u 7 6 8 4 \ \ u 5 9 3 4 \ \ u 6 5 8 7 \ \ u 4 e f 6 \ \ u 5 d f 2 \ \ u 7 e c f \ \ u 8 8 a b \ \ u 8 1 e a \ \ u 5 2 a 8 \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 5 9 8 2 \ \ u 6 0 f 3 \ \ u 4 f 7 f \ \ u 7 5 2 8 \ \ u 5 4 c 8 \ \ u 5 e 0 c \ \ u 8 8 6 8 \ \ u 8 f d 0 \ \ u 7 b 9 7 , \ \ u 6 0 a 8 \ \ u 5 3 e f \ \ u 4 e e 5 \ \ u 4 f 7 f \ \ u 7 5 2 8 < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / t r o y d h a n s o n . g i t h u b . i o \ \ / u t h a s h \ \ / \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > u t h a s h < \ \ / a > \ \ u 3 0 0 2 \ \ \ " u t h a s h . h \ \ \ " \ \ u 5 d f 2 \ \ u 7 e c f \ \ u 9 e d 8 \ \ u 8 b a 4 \ \ u 8 8 a b \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u 3 0 0 2 \ \ u 8 b f 7 \ \ u 7 7 0 b \ \ u 5 9 8 2 \ \ u 4 e 0 b \ \ u 7 9 3 a \ \ u 4 f 8 b : < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > < b > 1 . \ \ u 5 f 8 0 \ \ u 5 4 c 8 \ \ u 5 e 0 c \ \ u 8 8 6 8 \ \ u 4 e 2 d \ \ u 6 d f b \ \ u 5 2 a 0 \ \ u 4 e 0 0 \ \ u 4 e 2 a \ \ u 5 b f 9 \ \ u 8 c 6 1 \ \ u f f 1 a < \ \ / b > \ \ r \ \ n < p r e > \ \ r \ \ n s t r u c t h a s h _ e n t r y { \ \ r \ \ n i n t i d ; \ \ / * w e ' l l u s e t h i s f i e l d a s t h e k e y * \ \ / \ \ r \ \ n c h a r n a m e [ 1 0 ] ; \ \ r \ \ n U T _ h a s h _ h a n d l e h h ; \ \ / * m a k e s t h i s s t r u c t u r e h a s h a b l e * \ \ / \ \ r \ \ n } ; \ \ r \ \ n \ \ r \ \ n s t r u c t h a s h _ e n t r y * u s e r s = N U L L ; \ \ r \ \ n \ \ r \ \ n v o i d a d d _ u s e r ( s t r u c t h a s h _ e n t r y * s ) { \ \ r \ \ n H A S H _ A D D _ I N T ( u s e r s , i d , s ) ; \ \ r \ \ n } \ \ r \ \ n < \ \ / p r e > \ \ r \ \ n < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > < b > 2 . \ \ u 5728 \ \ u 54 c 8 \ \ u 5e0 c \ \ u 8868 \ \ u 4e2 d \ \ u 67e5 \ \ u 627 e \ \ u 4e00 \ \ u 4e2 a \ \ u 5 b f 9 \ \ u 8 c 61 \ \ u f f 1 a < \ \ / b > \ \ r \ \ n < p r e > \ \ r \ \ n s t r u c t h a s h _ e n t r y * f i n d _ u s e r ( i n t u s e r _ i d ) { \ \ r \ \ n s t r u c t h a s h _ e n t r y * s ; \ \ r \ \ n H A S H _ F I N D _ I N T ( u s e r s , & u s e r _ i d , s ) ; \ \ r \ \ n r e
2022-03-27 20:38:29 +08:00
"book" : null ,
"isSubscribed" : false ,
"isDailyQuestion" : false ,
"dailyRecordStatus" : null ,
"editorType" : "CKEDITOR" ,
"ugcQuestionId" : null ,
"style" : "LEETCODE" ,
"exampleTestcases" : "\"ch ie pr\"\n3\n\"iveo eed l te olc\"\n4\n\"coding\"\n1" ,
"__typename" : "QuestionNode"
}
}
}