{"id":4295,"date":"2023-08-11T15:26:24","date_gmt":"2023-08-11T09:56:24","guid":{"rendered":"https:\/\/www.interviewbit.com\/blog\/?p=4295"},"modified":"2023-08-11T15:34:30","modified_gmt":"2023-08-11T10:04:30","slug":"number-of-islands","status":"publish","type":"post","link":"https:\/\/www.interviewbit.com\/blog\/number-of-islands\/","title":{"rendered":"Finding The Number of Islands"},"content":{"rendered":"\n<div class=\"gutentoc tocactive nostyle\"><div class=\"gutentoc-toc-wrap\"><div class=\"gutentoc-toc-title-wrap\"><div class=\"gutentoc-toc-title\">Table Of Contents<\/div><div id=\"open\" class=\"text_open\">show<\/div><\/div><div id=\"toclist\"><div class=\"gutentoc-toc__list-wrap\"><ul class=\"gutentoc-toc__list\"><li><a href=\"#problem-statement\">Problem Statement<\/a><\/li><li><a href=\"#approach-1-dfs\">Approach 1: DFS<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#c-code-implementation\">C++ Code Implementation<\/a><\/li><li><a href=\"#java-code-implementation\">Java Code Implementation<\/a><\/li><li><a href=\"#python-code-implementation\">Python Code Implementation<\/a><\/li><\/ul><li><a href=\"#approach-2-bfs\">Approach 2: BFS<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#c-code-implementation\">C++ Code Implementation<\/a><\/li><li><a href=\"#java-code-implementation\">Java Code Implementation<\/a><\/li><li><a href=\"#python-code-implementation\">Python Code Implementation<\/a><\/li><\/ul><li><a href=\"#practice-question\">Practice Question<\/a><\/li><li><a href=\"#faqs\">FAQs<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#q1-what-is-the-time-and-space-complexity-of-the-dfs-approach\">Q.1: What is the time and space complexity of the DFS approach?<\/a><\/li><li><a href=\"#q2-in-terms-of-space-complexity-is-the-bfs-approach-efficient-over-dfs\">Q.2: In terms of space complexity, is the BFS approach efficient over DFS?<\/a><\/li><\/ul><\/ul><\/div><\/div><\/div><\/div>\n\n\n\n<h2 id=\"problem-statement\">Problem Statement<\/h2>\n\n\n\n<p>Given a matrix of size M x N, where \u20181\u2019 represents land, while \u20180\u2019 represents water. The task is to return the number of islands present in the matrix. An <strong>island<\/strong> is a group of 1\u2019s surrounded either vertically or horizontally.<\/p>\n\n\n\n<p><strong>Examples:<\/strong><\/p>\n\n\n\n<p><strong>Input:<\/strong><br><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img  loading=\"lazy\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-4449 pk-lazyload\"  width=\"449\"  height=\"449\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 449px) 100vw, 449px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image-1-18.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image-1-18.png 1000w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image-1-18-300x300.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image-1-18-150x150.png 150w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image-1-18-768x768.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image-1-18-80x80.png 80w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image-1-18-110x110.png 110w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image-1-18-380x380.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image-1-18-550x550.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image-1-18-800x800.png 800w\" ><\/figure><\/div>\n\n\n\n<p><strong>Output:<\/strong> 3<br><strong>Explanation: <\/strong>Shown in the image<\/p>\n\n\n\n<h2 id=\"approach-1-dfs\">Approach 1: DFS<\/h2>\n\n\n\n<p>The idea is to consider the given matrix as a graph, where each cell is a node of the given graph. Two nodes contain an edge if and only if there is a \u20181\u2019 either horizontally or vertically.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img  loading=\"lazy\"  width=\"632\"  height=\"628\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-4450 pk-lazyload\"  data-pk-sizes=\"auto\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/GIF.gif\" ><\/figure><\/div>\n\n\n\n<p><strong>Algorithm<\/strong><\/p>\n\n\n\n<ul><li>Scan the matrix from (0,0) to (N, M).<\/li><li>If the current element is \u20181\u2019, start a DFS.<\/li><li>In the DFS traversal, mark every visited node.<\/li><li>Count the number of islands as the number of nodes that trigger the DFS.<\/li><li>Return count.<\/li><\/ul>\n\n\n\n<h3 id=\"c-code-implementation\"><span id=\"c-code-implementation-2\">C++ Code Implementation<\/span><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">void dfs(vector &amp;lt; vector &amp;lt; char >> &amp;amp; grid, int r, int c) {\n  int nr = grid.size();\n  int nc = grid[0].size();\n \n  grid[r][c] = '0';\n  if (r - 1 >= 0 &amp;amp;&amp;amp; grid[r - 1][c] == '1') dfs(grid, r - 1, c);\n  if (r + 1 &amp;lt; nr &amp;amp;&amp;amp; grid[r + 1][c] == '1') dfs(grid, r + 1, c);\n  if (c - 1 >= 0 &amp;amp;&amp;amp; grid[r][c - 1] == '1') dfs(grid, r, c - 1);\n  if (c + 1 &amp;lt; nc &amp;amp;&amp;amp; grid[r][c + 1] == '1') dfs(grid, r, c + 1);\n}\n \nint numIslands(vector &amp;lt; vector &amp;lt; char >> &amp;amp; grid) {\n  int nr = grid.size();\n  if (!nr) return 0;\n  int nc = grid[0].size();\n \n  int num_islands = 0;\n  for (int r = 0; r &amp;lt; nr; ++r) {\n    for (int c = 0; c &amp;lt; nc; ++c) {\n      if (grid[r][c] == '1') {\n        ++num_islands;\n        dfs(grid, r, c);\n      }\n    }\n  }\n \n  return num_islands;\n}<\/pre>\n\n\n\n<h3 id=\"java-code-implementation\"><span id=\"java-code-implementation-2\">Java Code Implementation<\/span><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> void dfs(char[][] grid, int r, int c) {\n  int nr = grid.length;\n  int nc = grid[0].length;\n \n  if (r &amp;lt; 0 || c &amp;lt; 0 || r >= nr || c >= nc || grid[r][c] == '0') {\n    return;\n  }\n \n  grid[r][c] = '0';\n  dfs(grid, r - 1, c);\n  dfs(grid, r + 1, c);\n  dfs(grid, r, c - 1);\n  dfs(grid, r, c + 1);\n}\n \npublic int numIslands(char[][] grid) {\n  if (grid == null || grid.length == 0) {\n    return 0;\n  }\n \n  int nr = grid.length;\n  int nc = grid[0].length;\n  int num_islands = 0;\n  for (int r = 0; r &amp;lt; nr; ++r) {\n    for (int c = 0; c &amp;lt; nc; ++c) {\n      if (grid[r][c] == '1') {\n        ++num_islands;\n        dfs(grid, r, c);\n      }\n    }\n  }\n \n  return num_islands;\n}<\/pre>\n\n\n\n<h3 id=\"python-code-implementation\"><span id=\"python-code-implementation-2\">Python Code Implementation<\/span><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def numIslands(self, grid):\n    if not grid:\n        return 0\n \n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == \"1\":\n                self.dfs(grid, i, j)\n                count += 1\n    return count\n \n \ndef dfs(self, grid, i, j):\n    if i &amp;lt; 0 or j &amp;lt; 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] != \"1\":\n        return\n    grid[i][j] = \"#\"\n    self.dfs(grid, i + 1, j)\n    self.dfs(grid, i - 1, j)\n    self.dfs(grid, i, j + 1)\n    self.dfs(grid, i, j - 1)<\/pre>\n\n\n\n<ul><li><strong>Time Complexity: <\/strong>O(M * N), where M and N are the size of the matrix<\/li><li><strong>Space Complexity:<\/strong> O(M * N).<\/li><\/ul>\n\n\n\n<h2 id=\"approach-2-bfs\">Approach 2: BFS<\/h2>\n\n\n\n<p>The problem can also be solved using the BFS approach. The logic remains the same as the previous approach.<\/p>\n\n\n\n<p><strong>Algorithm<\/strong><\/p>\n\n\n\n<ul><li>Scan the matrix from (0,0) till (N, M).<\/li><li>If the current element is \u20181\u2019, start a <strong>BFS<\/strong>.<\/li><li>Consider a queue and put the current node into the queue.<\/li><li>Iteratively visit its neighbours vertically and horizontally and mark them as visited.<\/li><li>The count is the total number of times the BFS has been invoked.<\/li><li>Return count.<\/li><\/ul>\n\n\n\n<h3 id=\"c-code-implementation\">C++ Code Implementation<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">int numIslands(vector &amp;lt; vector &amp;lt; char >> &amp;amp; grid) {\n    int nr = grid.size();\n    if (!nr) return 0;\n    int nc = grid[0].size();\n \n    int num_islands = 0;\n    for (int r = 0; r &amp;lt; nr; ++r) {\n      for (int c = 0; c &amp;lt; nc; ++c) {\n        if (grid[r][c] == '1') {\n          ++num_islands;\n          grid[r][c] = '0'; \/\/ mark as visited\n          queue &amp;lt; pair &amp;lt; int, int >> neighbors;\n          neighbors.push({\n            r,\n            c\n          });\n          while (!neighbors.empty()) {\n            auto rc = neighbors.front();\n            neighbors.pop();\n            int row = rc.first, col = rc.second;\n            if (row - 1 >= 0 &amp;amp;&amp;amp; grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t == '1') {\n              neighbors.push({\n                row - 1,\n                col\n              });\n              grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t = '0';\n            }\n            if (row + 1 &amp;lt; nr &amp;amp;&amp;amp; grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t == '1') {\n              neighbors.push({\n                row + 1,\n                col\n              });\n              grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t = '0';\n            }\n            if (col - 1 >= 0 &amp;amp;&amp;amp; grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t == '1') {\n              neighbors.push({\n                row,\n                col - 1\n              });\n              grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t = '0';\n            }\n            if (col + 1 &amp;lt; nc &amp;amp;&amp;amp; grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t == '1') {\n              neighbors.push({\n                row,\n                col + 1\n              });\n              grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t = '0';\n            }\n          }\n        }\n      }\n    }\n \n    return num_islands;<\/pre>\n\n\n\n<h3 id=\"java-code-implementation\">Java Code Implementation<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public int numIslands(char[][] grid) {\n  if (grid == null || grid.length == 0) {\n    return 0;\n  }\n \n  int nr = grid.length;\n  int nc = grid[0].length;\n  int num_islands = 0;\n \n  for (int r = 0; r &amp;lt; nr; ++r) {\n    for (int c = 0; c &amp;lt; nc; ++c) {\n      if (grid[r][c] == '1') {\n        ++num_islands;\n        grid[r][c] = '0'; \/\/ mark as visited\n        Queue &amp;lt; Integer > neighbors = new LinkedList &amp;lt; > ();\n        neighbors.add(r * nc + c);\n        while (!neighbors.isEmpty()) {\n          int id = neighbors.remove();\n          int row = id \/ nc;\n          int col = id % nc;\n          if (row - 1 >= 0 &amp;amp;&amp;amp; grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t == '1') {\n            neighbors.add((row - 1) * nc + col);\n            grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t = '0';\n          }\n          if (row + 1 &amp;lt; nr &amp;amp;&amp;amp; grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t == '1') {\n            neighbors.add((row + 1) * nc + col);\n            grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t = '0';\n          }\n          if (col - 1 >= 0 &amp;amp;&amp;amp; grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t == '1') {\n            neighbors.add(row * nc + col - 1);\n            grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t = '0';\n          }\n          if (col + 1 &amp;lt; nc &amp;amp;&amp;amp; grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t == '1') {\n            neighbors.add(row * nc + col + 1);\n            grid\t\t\t<div class=\"pk-row\">\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"pk-col-md-1\">\n\t\t\t\t\t\t\t<\/div>\n\t\t = '0';\n          }\n        }\n      }\n    }\n  }\n \n  return num_islands;\n}<\/pre>\n\n\n\n<h3 id=\"python-code-implementation\">Python Code Implementation<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from collections import deque\n \n \ndef numIslands(grid):\n    if not grid:\n        return 0\n    lands = set(\n        [\n            (i, j)\n            for j in xrange(len(grid[0]))\n            for i in xrange(len(grid))\n            if grid[i][j] == \"1\"\n        ]\n    )\n    count = 0\n    while lands:\n        count += 1\n        i, j = lands.pop()\n        connected = deque()\n        connected.append((i, j))\n        while connected:\n            i, j = connected.popleft()\n            if (i + 1, j) in lands:\n                connected.append((i + 1, j))\n                lands.remove((i + 1, j))\n            if (i - 1, j) in lands:\n                connected.append((i - 1, j))\n                lands.remove((i - 1, j))\n            if (i, j + 1) in lands:\n                connected.append((i, j + 1))\n                lands.remove((i, j + 1))\n            if (i, j - 1) in lands:\n                connected.append((i, j - 1))\n                lands.remove((i, j - 1))\n    return count<\/pre>\n\n\n\n<p><strong>Time Complexity:<\/strong>O(M * N), where M and N is the size of the matrix<br><strong>Space Complexity:<\/strong>O(min(M,N)).<\/p>\n\n\n\n<h2 id=\"practice-question\">Practice Question<\/h2>\n\n\n\n<ul><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/problems\/commutable-islands\/\" target=\"_blank\">Commutable Islands<\/a><\/li><\/ul>\n\n\n\n<h2 id=\"faqs\">FAQs<\/h2>\n\n\n\n<h3 id=\"q1-what-is-the-time-and-space-complexity-of-the-dfs-approach\"><span id=\"q-1-what-is-the-time-and-space-complexity-of-the-dfs-approach\">Q.1: What is the time and space complexity of the DFS approach?<\/span><\/h3>\n\n\n\n<p><strong>Ans:<\/strong> The time and space complexity of the DFS\u00a0 approach is O(M * N) and O(M * N).<\/p>\n\n\n\n<h3 id=\"q2-in-terms-of-space-complexity-is-the-bfs-approach-efficient-over-dfs\"><span id=\"q-2-in-terms-of-space-complexity-is-the-bfs-approach-efficient-over-dfs\">Q.2: In terms of space complexity, is the BFS approach efficient over DFS?<\/span><\/h3>\n\n\n\n<p><strong>Ans: <\/strong>Yes, the space complexity for the BFS approach is O(min(N,M)), in the worst case when the grid is filled completely with 1\u2019s, whereas for DFS it is O(N*M).<\/p>\n","protected":false},"excerpt":{"rendered":"Problem Statement Given a matrix of size M x N, where \u20181\u2019 represents land, while \u20180\u2019 represents water.&hellip;\n","protected":false},"author":5,"featured_media":4452,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_daextam_enable_autolinks":"1","csco_singular_sidebar":"","csco_page_header_type":"","csco_appearance_grid":"","csco_page_load_nextpost":"","csco_post_video_location":[],"csco_post_video_location_hash":"","csco_post_video_url":"","csco_post_video_bg_start_time":0,"csco_post_video_bg_end_time":0},"categories":[145],"tags":[612],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/4295"}],"collection":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/comments?post=4295"}],"version-history":[{"count":7,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/4295\/revisions"}],"predecessor-version":[{"id":22665,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/4295\/revisions\/22665"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/media\/4452"}],"wp:attachment":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/media?parent=4295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/categories?post=4295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/tags?post=4295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}