mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-03 06:22:54 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个由 <code>'1'</code>(陆地)和 <code>'0'</code>(水)组成的的二维网格,请你计算网格中岛屿的数量。</p>\n\n<p>岛屿总是被水包围,并且每座岛屿只能由水平方向和/或竖直方向上相邻的陆地连接形成。</p>\n\n<p>此外,你可以假设该网格的四条边均被水包围。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>grid = [\n [\"1\",\"1\",\"1\",\"1\",\"0\"],\n [\"1\",\"1\",\"0\",\"1\",\"0\"],\n [\"1\",\"1\",\"0\",\"0\",\"0\"],\n [\"0\",\"0\",\"0\",\"0\",\"0\"]\n]\n<strong>输出:</strong>1\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>grid = [\n [\"1\",\"1\",\"0\",\"0\",\"0\"],\n [\"1\",\"1\",\"0\",\"0\",\"0\"],\n [\"0\",\"0\",\"1\",\"0\",\"0\"],\n [\"0\",\"0\",\"0\",\"1\",\"1\"]\n]\n<strong>输出:</strong>3\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>m == grid.length</code></li>\n\t<li><code>n == grid[i].length</code></li>\n\t<li><code>1 <= m, n <= 300</code></li>\n\t<li><code>grid[i][j]</code> 的值为 <code>'0'</code> 或 <code>'1'</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 1625,
|
||||
"likes": 1682,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Surrounded Regions\", \"titleSlug\": \"surrounded-regions\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u88ab\\u56f4\\u7ed5\\u7684\\u533a\\u57df\"}, {\"title\": \"Walls and Gates\", \"titleSlug\": \"walls-and-gates\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u5899\\u4e0e\\u95e8\"}, {\"title\": \"Number of Islands II\", \"titleSlug\": \"number-of-islands-ii\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u5c9b\\u5c7f\\u6570\\u91cf II\"}, {\"title\": \"Number of Connected Components in an Undirected Graph\", \"titleSlug\": \"number-of-connected-components-in-an-undirected-graph\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u65e0\\u5411\\u56fe\\u4e2d\\u8fde\\u901a\\u5206\\u91cf\\u7684\\u6570\\u76ee\"}, {\"title\": \"Number of Distinct Islands\", \"titleSlug\": \"number-of-distinct-islands\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u4e0d\\u540c\\u5c9b\\u5c7f\\u7684\\u6570\\u91cf\"}, {\"title\": \"Max Area of Island\", \"titleSlug\": \"max-area-of-island\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u5c9b\\u5c7f\\u7684\\u6700\\u5927\\u9762\\u79ef\"}]",
|
||||
@@ -55,7 +55,7 @@
|
||||
{
|
||||
"lang": "C++",
|
||||
"langSlug": "cpp",
|
||||
"code": "class Solution {\npublic:\n int numIslands(vector<vector<char>>& grid) {\n\n }\n};",
|
||||
"code": "class Solution {\npublic:\n int numIslands(vector<vector<char>>& grid) {\n \n }\n};",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
@@ -161,12 +161,12 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"433.4K\", \"totalSubmission\": \"756.9K\", \"totalAcceptedRaw\": 433438, \"totalSubmissionRaw\": 756881, \"acRate\": \"57.3%\"}",
|
||||
"stats": "{\"totalAccepted\": \"455.9K\", \"totalSubmission\": \"792.3K\", \"totalAcceptedRaw\": 455874, \"totalSubmissionRaw\": 792308, \"acRate\": \"57.5%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "[[\"1\",\"1\",\"1\",\"1\",\"0\"],[\"1\",\"1\",\"0\",\"1\",\"0\"],[\"1\",\"1\",\"0\",\"0\",\"0\"],[\"0\",\"0\",\"0\",\"0\",\"0\"]]",
|
||||
"metaData": "{\r\n \"name\": \"numIslands\",\r\n \"params\": [\r\n {\r\n \"name\": \"grid\",\r\n \"type\": \"character[][]\"\r\n }\r\n ],\r\n \"return\": {\r\n \"type\": \"integer\"\r\n }\r\n}",
|
||||
"metaData": "{\n \"name\": \"numIslands\",\n \"params\": [\n {\n \"name\": \"grid\",\n \"type\": \"character[][]\"\n }\n ],\n \"return\": {\n \"type\": \"integer\"\n },\n \"manual\": false\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [],
|
||||
|
Reference in New Issue
Block a user