{"id":351,"date":"2025-06-24T11:46:46","date_gmt":"2025-06-24T06:16:46","guid":{"rendered":"https:\/\/codeanddebug.in\/blog\/?p=351"},"modified":"2025-07-07T20:48:37","modified_gmt":"2025-07-07T15:18:37","slug":"union-of-2-sorted-with-duplicates","status":"publish","type":"post","link":"https:\/\/codeanddebug.in\/blog\/union-of-2-sorted-with-duplicates\/","title":{"rendered":"Union of 2 Sorted with Duplicates | Explained with Images"},"content":{"rendered":"\n<p>Given two&nbsp;<strong>sorted<\/strong>&nbsp;arrays&nbsp;<strong>a[]<\/strong>&nbsp;and&nbsp;<strong>b[]<\/strong>, where each array may contain&nbsp;<strong>duplicate<\/strong>&nbsp;elements , the task is to return the elements in the&nbsp;<strong>union<\/strong>&nbsp;of the two arrays in&nbsp;<strong>sorted<\/strong>&nbsp;order.<\/p>\n\n\n\n<p>Here&#8217;s the [<strong><a href=\"https:\/\/www.geeksforgeeks.org\/problems\/union-of-two-sorted-arrays-1587115621\/1\" target=\"_blank\" rel=\"noreferrer noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\"><span style=\"text-decoration: underline;\">Problem Link<\/span><\/mark><\/a><\/strong>] to begin with.<\/p>\n\n\n<div style=\"max-width: -moz-fit-content; \" class=\"wp-block-ub-table-of-contents-block ub_table-of-contents ub_table-of-contents-collapsed\" id=\"ub_table-of-contents-8b71f687-752a-4046-a40f-bc6c98d21cb5\" data-linktodivider=\"false\" data-showtext=\"show\" data-hidetext=\"hide\" data-scrolltype=\"auto\" data-enablesmoothscroll=\"true\" data-initiallyhideonmobile=\"false\" data-initiallyshow=\"false\"><div class=\"ub_table-of-contents-header-container\" style=\"\">\n\t\t\t<div class=\"ub_table-of-contents-header\" style=\"text-align: left; \">\n\t\t\t\t<div class=\"ub_table-of-contents-title\">Contents:<\/div>\n\t\t\t\t<div class=\"ub_table-of-contents-header-toggle\">\n\t\t\t<div class=\"ub_table-of-contents-toggle\" style=\"\">\n\t\t\t\u00a0[<a class=\"ub_table-of-contents-toggle-link\" href=\"#\" style=\"\">show<\/a>]\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div><div class=\"ub_table-of-contents-extra-container\" style=\"\">\n\t\t\t<div class=\"ub_table-of-contents-container ub_table-of-contents-1-column ub-hide\">\n\t\t\t\t<ul style=\"\"><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/union-of-2-sorted-with-duplicates\/#0-optimal-solution\" style=\"\">OPTIMAL SOLUTION<\/a><ul><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/union-of-2-sorted-with-duplicates\/#1-1-problem-statement-\" style=\"\">1. Problem Statement<\/a><\/li><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/union-of-2-sorted-with-duplicates\/#2-2-intuition-and-approach-\" style=\"\">2. Intuition and Approach<\/a><\/li><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/union-of-2-sorted-with-duplicates\/#3-3-code-\" style=\"\">3. Code<\/a><\/li><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/union-of-2-sorted-with-duplicates\/#4-4-dry-run-\" style=\"\">4. Dry Run<\/a><\/li><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/union-of-2-sorted-with-duplicates\/#5-5-edge-cases-\" style=\"\">5. Edge Cases<\/a><\/li><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/union-of-2-sorted-with-duplicates\/#6-6-time-and-space-complexity-\" style=\"\">6. Time and Space Complexity<\/a><\/li><\/ul><\/li><\/ul>\n\t\t\t<\/div>\n\t\t<\/div><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"0-optimal-solution\">OPTIMAL SOLUTION<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-1-problem-statement-\"><strong>1. Problem Statement<\/strong><\/h3>\n\n\n\n<p>The goal is to produce the union of two sorted arrays a and b, such that the resulting array result is also sorted and contains no duplicates. This task requires merging and deduplicating the elements of both arrays effectively.<\/p>\n\n\n\n<p><strong>Input:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>a: A sorted list of integers.<\/li>\n\n\n\n<li>b: Another sorted list of integers.<\/li>\n<\/ul>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A list of integers representing the union of a and b, sorted and without duplicates.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-2-intuition-and-approach-\"><strong>2. Intuition and Approach<\/strong><\/h3>\n\n\n\n<p>This approach uses the two-pointer technique to efficiently merge two sorted arrays while ensuring no duplicates. The pointers i and j traverse arrays a and b respectively:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Compare the current elements of both arrays.<\/li>\n\n\n\n<li>Append the smaller or equal element to the result if it&#8217;s not the same as the last appended element.<\/li>\n\n\n\n<li>Increment the pointer in the array from which the element was taken.<\/li>\n\n\n\n<li>Continue this process until one or both of the arrays are fully traversed.<\/li>\n\n\n\n<li>After exiting the main loop, if any elements are left in either array, they are added to the result, ensuring duplicates are not added.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-3-code-\"><strong>3. Code<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"def sortedArray(a: [int], b: [int]) -&gt; [int]:\n    i = 0\n    j = 0\n    result = []\n    while i &lt; len(a) and j &lt; len(b):\n        if a[i] &lt;= b[j]:\n            if len(result) == 0 or result[-1] != a[i]:\n                result.append(a[i])\n            i += 1\n        else:\n            if len(result) == 0 or result[-1] != b[j]:\n                result.append(b[j])\n            j += 1\n\n    while i &lt; len(a):\n        if len(result) == 0 or result[-1] != a[i]:\n            result.append(a[i])\n        i += 1\n\n    while j &lt; len(b):\n        if len(result) == 0 or result[-1] != b[j]:\n            result.append(b[j])\n        j += 1\n\n    return result\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">def<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">sortedArray<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">a<\/span><span style=\"color: #D4D4D4\">: [<\/span><span style=\"color: #4EC9B0\">int<\/span><span style=\"color: #D4D4D4\">], <\/span><span style=\"color: #9CDCFE\">b<\/span><span style=\"color: #D4D4D4\">: [<\/span><span style=\"color: #4EC9B0\">int<\/span><span style=\"color: #D4D4D4\">]) -&gt; [<\/span><span style=\"color: #4EC9B0\">int<\/span><span style=\"color: #D4D4D4\">]:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    i = <\/span><span style=\"color: #B5CEA8\">0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    j = <\/span><span style=\"color: #B5CEA8\">0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    result = []<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">while<\/span><span style=\"color: #D4D4D4\"> i &lt; <\/span><span style=\"color: #DCDCAA\">len<\/span><span style=\"color: #D4D4D4\">(a) <\/span><span style=\"color: #569CD6\">and<\/span><span style=\"color: #D4D4D4\"> j &lt; <\/span><span style=\"color: #DCDCAA\">len<\/span><span style=\"color: #D4D4D4\">(b):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> a[i] &lt;= b[j]:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">len<\/span><span style=\"color: #D4D4D4\">(result) == <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">or<\/span><span style=\"color: #D4D4D4\"> result[-<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">] != a[i]:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                result.append(a[i])<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            i += <\/span><span style=\"color: #B5CEA8\">1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">else<\/span><span style=\"color: #D4D4D4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">len<\/span><span style=\"color: #D4D4D4\">(result) == <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">or<\/span><span style=\"color: #D4D4D4\"> result[-<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">] != b[j]:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                result.append(b[j])<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            j += <\/span><span style=\"color: #B5CEA8\">1<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">while<\/span><span style=\"color: #D4D4D4\"> i &lt; <\/span><span style=\"color: #DCDCAA\">len<\/span><span style=\"color: #D4D4D4\">(a):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">len<\/span><span style=\"color: #D4D4D4\">(result) == <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">or<\/span><span style=\"color: #D4D4D4\"> result[-<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">] != a[i]:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            result.append(a[i])<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        i += <\/span><span style=\"color: #B5CEA8\">1<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">while<\/span><span style=\"color: #D4D4D4\"> j &lt; <\/span><span style=\"color: #DCDCAA\">len<\/span><span style=\"color: #D4D4D4\">(b):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">len<\/span><span style=\"color: #D4D4D4\">(result) == <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">or<\/span><span style=\"color: #D4D4D4\"> result[-<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">] != b[j]:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            result.append(b[j])<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        j += <\/span><span style=\"color: #B5CEA8\">1<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">return<\/span><span style=\"color: #D4D4D4\"> result<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Two-Pointer Technique:<\/strong>\n<ol class=\"wp-block-list\">\n<li>The i and j pointers are initialized at the start of arrays a and b.<\/li>\n\n\n\n<li>A while loop continues as long as there are elements to process in both arrays.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Comparison and Addition:<\/strong>\n<ol class=\"wp-block-list\">\n<li>Inside the loop, compare a[i] to b[j].<\/li>\n\n\n\n<li>Append the smaller or equal value to result if it is not the same as the last element in result (to avoid duplicates).<\/li>\n\n\n\n<li>Increment the respective pointer (i or j).<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Processing Remaining Elements:<\/strong>\n<ol class=\"wp-block-list\">\n<li>Once the main while loop exits (when one of the arrays is exhausted), the remaining elements in either a or b (or both) are added to result. The additional while loops ensure no duplicates are added.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Finalizing the Union:<\/strong>\n<ol class=\"wp-block-list\">\n<li>The process ensures all elements from both arrays are considered, and the union is sorted and duplicate-free due to the initial sorting and the checks during insertion.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-4-dry-run-\"><strong>4. Dry Run<\/strong><\/h3>\n\n\n\n<p>Let&#8217;s go through the code step by step, using images to illustrate the detailed dry run process.<img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXf1Fq2DNJEZlONkTn3CRT6llXKJr2OH6su9O2lLH2gl15mafJ-_SLCV49XmNwZlt8w8_KuvGm68sGa_sx76mzj23rqy827P14dB17EuyoCeSg9XRsLP4gZBXQs5JuA-TjJpuAQ_vQ?key=_fZO84-SaU3gIeCcCV0hRQ\" width=\"682\" height=\"384\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/06\/image-1-1024x576.png\" alt=\"\" class=\"wp-image-353\" srcset=\"https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/06\/image-1-1024x576.png 1024w, https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/06\/image-1-300x169.png 300w, https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/06\/image-1-768x432.png 768w, https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/06\/image-1-1536x864.png 1536w, https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/06\/image-1-150x84.png 150w, https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/06\/image-1-450x253.png 450w, https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/06\/image-1-1200x675.png 1200w, https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/06\/image-1.png 1600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5-5-edge-cases-\"><strong>5. Edge Cases<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Empty Arrays:<\/strong> If either a or b is empty, the code correctly handles and appends the contents of the non-empty array to result.<\/li>\n\n\n\n<li><strong>Identical Arrays:<\/strong> If a and b are the same, the method effectively adds each element once.<\/li>\n\n\n\n<li><strong>Arrays with No Common Elements:<\/strong> If a and b share no common elements, all elements from both arrays are included in the union.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"6-6-time-and-space-complexity-\"><strong>6. Time and Space Complexity<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Time Complexity:<\/strong> <strong>O(n+m)<\/strong>, where <strong>n<\/strong> is the length of array a and <strong>m<\/strong> is the length of array b. Each element in both arrays is processed at most once.<\/li>\n\n\n\n<li><strong>Space Complexity:<\/strong> <strong>O(n+m)<\/strong> for the result array in the worst case, where no elements are duplicated between a and b.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/www.codeanddebug.in\/course\/zero-to-hero-python-dsa\">Join our Advance DSA COURSE<\/a><\/div>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><em>For any changes to the article, kindly email at <a href=\"mailto:code@codeanddebug.in\">code@codeanddebug.in<\/a> or contact us at <a href=\"tel:+91-9712928220\">+91-9712928220.<\/a><\/em><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Given two&nbsp;sorted&nbsp;arrays&nbsp;a[]&nbsp;and&nbsp;b[], where each array may contain&nbsp;duplicate&nbsp;elements , the task is to return the elements in the&nbsp;union&nbsp;of the two arrays in&nbsp;sorted&nbsp;order. Here&#8217;s the [Problem Link] to begin with. OPTIMAL SOLUTION 1. Problem Statement The goal is to produce the union of two sorted arrays a and b, such that the resulting array result is also<\/p>\n","protected":false},"author":1,"featured_media":356,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[7,8],"class_list":{"0":"post-351","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-structures-and-algorithm","8":"category-beginner","9":"tag-array","10":"tag-easy"},"featured_image_src":"https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/06\/union-of-two-sorted-arrays-featured-image.png","author_info":{"display_name":"codeanddebug","author_link":"https:\/\/codeanddebug.in\/blog\/author\/codeanddebug\/"},"_links":{"self":[{"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/posts\/351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/comments?post=351"}],"version-history":[{"count":4,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/posts\/351\/revisions"}],"predecessor-version":[{"id":557,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/posts\/351\/revisions\/557"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/media\/356"}],"wp:attachment":[{"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/media?parent=351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/categories?post=351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/tags?post=351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}