1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-24 22:38:57 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>序列化是将数据结构或对象转换为一系列位的过程,以便它可以存储在文件或内存缓冲区中,或通过网络连接链路传输,以便稍后在同一个或另一个计算机环境中重建。</p>\n\n<p>设计一个算法来序列化和反序列化<strong> 二叉搜索树</strong> 。 对序列化/反序列化算法的工作方式没有限制。 您只需确保二叉搜索树可以序列化为字符串,并且可以将该字符串反序列化为最初的二叉搜索树。</p>\n\n<p><strong>编码的字符串应尽可能紧凑。</strong></p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>root = [2,1,3]\n<strong>输出:</strong>[2,1,3]\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>root = []\n<strong>输出:</strong>[]\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li>树中节点数范围是 <code>[0, 10<sup>4</sup>]</code></li>\n\t<li><code>0 &lt;= Node.val &lt;= 10<sup>4</sup></code></li>\n\t<li>题目数据 <strong>保证</strong> 输入的树是一棵二叉搜索树。</li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 258,
"likes": 262,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Serialize and Deserialize Binary Tree\", \"titleSlug\": \"serialize-and-deserialize-binary-tree\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u4e8c\\u53c9\\u6811\\u7684\\u5e8f\\u5217\\u5316\\u4e0e\\u53cd\\u5e8f\\u5217\\u5316\"}, {\"title\": \"Find Duplicate Subtrees\", \"titleSlug\": \"find-duplicate-subtrees\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u5bfb\\u627e\\u91cd\\u590d\\u7684\\u5b50\\u6811\"}, {\"title\": \"Serialize and Deserialize N-ary Tree\", \"titleSlug\": \"serialize-and-deserialize-n-ary-tree\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u5e8f\\u5217\\u5316\\u548c\\u53cd\\u5e8f\\u5217\\u5316 N \\u53c9\\u6811\"}]",
@@ -155,7 +155,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"19.2K\", \"totalSubmission\": \"34.1K\", \"totalAcceptedRaw\": 19198, \"totalSubmissionRaw\": 34072, \"acRate\": \"56.3%\"}",
"stats": "{\"totalAccepted\": \"19.9K\", \"totalSubmission\": \"35.3K\", \"totalAcceptedRaw\": 19941, \"totalSubmissionRaw\": 35273, \"acRate\": \"56.5%\"}",
"hints": [],
"solution": null,
"status": null,