{"id":721,"date":"2025-07-21T16:35:07","date_gmt":"2025-07-21T11:05:07","guid":{"rendered":"https:\/\/codeanddebug.in\/blog\/?p=721"},"modified":"2025-07-21T16:35:20","modified_gmt":"2025-07-21T11:05:20","slug":"print-all-subsequences-with-sum-k","status":"publish","type":"post","link":"https:\/\/codeanddebug.in\/blog\/print-all-subsequences-with-sum-k\/","title":{"rendered":"Print all subsequences with Sum = K: Complete\u00a0Guide with Backtracking"},"content":{"rendered":"\n<p>Given an&nbsp;array of positive&nbsp;integers and&nbsp;a target sum&nbsp;K, generate and&nbsp;print all subsequences of the array&nbsp;whose sum equals&nbsp;K. A subsequence&nbsp;is a sequence&nbsp;that can be derived&nbsp;from the array&nbsp;by deleting some&nbsp;or no elements&nbsp;without changing&nbsp;the order of&nbsp;the remaining&nbsp;elements.<\/p>\n\n\n\n<p><strong>Note:&nbsp;<\/strong>A subsequence is a subset that can be derived from an array by removing zero or more elements, without changing the order of the remaining elements.<\/p>\n\n\n\n<p><strong>Examples:<\/strong>&nbsp;&nbsp;<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Input:<\/strong> arr[] = [1, 2, 3], k = 3&nbsp;<br><strong>Output:<\/strong>&nbsp;[ [1, 2], [3] ]<br><strong>Explanation: <\/strong>All the subsequences of the given array are:<br>[ [1], [1, 2], [1, 2, 3], [1, 3], [2], [2, 3], [3], [] ]<br>Out of which only two subsequences have sum of their elements equal to 3.<\/p>\n\n\n\n<p><strong>Input:<\/strong> arr[] = [1, 2, 3], k = 7<br><strong>Output: <\/strong>[]<br><strong>Explanation: <\/strong>Sum of all the elements of the array is 6, which is smaller than the required sum, thus they are no subsequences with sum of its elements equal to 7.<\/p>\n\n\n\n<p><strong>Input:<\/strong> arr[] = [17, 18, 6, 11, 2, 4], k = 6&nbsp;&nbsp;<br><strong>Output:<\/strong>&nbsp;[ [2, 4], [6] ]&nbsp;<\/p>\n<\/blockquote>\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-40899cd2-d196-4a78-9c4c-c5148258bd62\" data-linktodivider=\"false\" data-showtext=\"show\" data-hidetext=\"hide\" data-scrolltype=\"auto\" data-enablesmoothscroll=\"true\" data-initiallyhideonmobile=\"true\" 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\/print-all-subsequences-with-sum-k\/#0-solution-backtracking-approach\" style=\"\">Solution: Backtracking Approach<\/a><ul><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/print-all-subsequences-with-sum-k\/#1-intuition\" style=\"\">Intuition<\/a><\/li><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/print-all-subsequences-with-sum-k\/#2-detailed-approach\" style=\"\">Detailed Approach<\/a><\/li><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/print-all-subsequences-with-sum-k\/#3-code\" style=\"\">Code<\/a><\/li><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/print-all-subsequences-with-sum-k\/#4-code-explanation\" style=\"\">Code Explanation<\/a><\/li><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/print-all-subsequences-with-sum-k\/#5-time-and-space-complexity\" style=\"\">Time and Space Complexity<\/a><\/li><\/ul><\/li><li style=\"\"><a href=\"https:\/\/codeanddebug.in\/blog\/print-all-subsequences-with-sum-k\/#6-simplifying-it\" style=\"\">Simplifying It<\/a><\/li><\/ul>\n\t\t\t<\/div>\n\t\t<\/div><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"0-solution-backtracking-approach\">Solution: Backtracking Approach<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-intuition\">Intuition<\/h3>\n\n\n\n<p>Imagine you&#8217;re packing a bag for a trip, and you want the total weight to be exactly K pounds. For each item in your suitcase (the array), you have two choices: pack it (include it in the sum) or leave it (skip it). You try one choice, see if it leads to the right weight, and if not, you backtrack (unpack the item) and try the other choice. This &#8220;try and undo&#8221; method is backtracking, it&#8217;s like exploring a tree of decisions, where each path is a possible subsequence. We stop when the sum hits K exactly or when we&#8217;ve tried all options.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-detailed-approach\">Detailed Approach<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Recursive Function<\/strong>: Create a helper function (backtrack) that takes the current subset, the current index in the array, and the current sum.<\/li>\n\n\n\n<li><strong>Base Cases<\/strong>:\n<ul class=\"wp-block-list\">\n<li>If the current sum equals K, add a copy of the subset to the result (we found a valid subsequence).<\/li>\n\n\n\n<li>If the current sum exceeds K, stop this path (no need to add more).<\/li>\n\n\n\n<li>If the index reaches the end of the array, stop (no more elements to consider).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Include Choice<\/strong>: Add the current element to the subset, update the sum, and recurse to the next index.<\/li>\n\n\n\n<li><strong>Backtrack<\/strong>: After exploring the &#8220;include&#8221; path, remove the element (pop it) to undo the choice.<\/li>\n\n\n\n<li><strong>Exclude Choice<\/strong>: Recurse to the next index without adding the current element (skip it).<\/li>\n\n\n\n<li><strong>Start Recursion<\/strong>: Call the function with an empty subset, index 0, and sum 0.<\/li>\n\n\n\n<li><strong>Collect Results<\/strong>: The result list will hold all valid subsequences.<\/li>\n<\/ol>\n\n\n\n<p>This explores all possible subsequences efficiently, pruning paths that exceed K to save time.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-code\">Code<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" 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;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);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=\"from typing import List\n\ndef backtrack(subset: List[int], index: int, total: int):\n    # Base case: If sum equals K, add a copy of the subset to result\n    if total == k:\n        result.append(subset.copy())\n        return\n    # Prune: If sum exceeds K, stop this path\n    elif total &gt; k:\n        return\n    # Base case: If index is out of bounds, stop\n    if index &gt;= len(nums):\n        return\n    \n    # Choice 1: Include the current element\n    subset.append(nums[index])  # Add to subset\n    Sum = total + nums[index]   # Update sum\n    backtrack(subset, index + 1, Sum)  # Recurse to next index\n    \n    # Backtrack: Undo the inclusion\n    subset.pop()                # Remove last element\n    Sum = total                 # Reset sum\n    \n    # Choice 2: Exclude the current element\n    backtrack(subset, index + 1, Sum)  # Recurse without adding\n\nresult = []                     # List to store all valid subsequences\nnums = [1, 2, 3, 4, 3, 2, 1, 1, 1, 1]  # Example array\nk = 3                           # Target sum\nbacktrack([], 0, 0)             # Start backtracking\nprint(result)                   # Print the 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: #C586C0\">from<\/span><span style=\"color: #D4D4D4\"> typing <\/span><span style=\"color: #C586C0\">import<\/span><span style=\"color: #D4D4D4\"> List<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">def<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">backtrack<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">subset<\/span><span style=\"color: #D4D4D4\">: List[<\/span><span style=\"color: #4EC9B0\">int<\/span><span style=\"color: #D4D4D4\">], <\/span><span style=\"color: #9CDCFE\">index<\/span><span style=\"color: #D4D4D4\">: <\/span><span style=\"color: #4EC9B0\">int<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">total<\/span><span style=\"color: #D4D4D4\">: <\/span><span style=\"color: #4EC9B0\">int<\/span><span style=\"color: #D4D4D4\">):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #6A9955\"># Base case: If sum equals K, add a copy of the subset to result<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> total == k:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        result.append(subset.copy())<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">return<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #6A9955\"># Prune: If sum exceeds K, stop this path<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">elif<\/span><span style=\"color: #D4D4D4\"> total &gt; k:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">return<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #6A9955\"># Base case: If index is out of bounds, stop<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> index &gt;= <\/span><span style=\"color: #DCDCAA\">len<\/span><span style=\"color: #D4D4D4\">(nums):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">return<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #6A9955\"># Choice 1: Include the current element<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    subset.append(nums[index])  <\/span><span style=\"color: #6A9955\"># Add to subset<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    Sum = total + nums[index]   <\/span><span style=\"color: #6A9955\"># Update sum<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    backtrack(subset, index + <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">, Sum)  <\/span><span style=\"color: #6A9955\"># Recurse to next index<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #6A9955\"># Backtrack: Undo the inclusion<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    subset.pop()                <\/span><span style=\"color: #6A9955\"># Remove last element<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    Sum = total                 <\/span><span style=\"color: #6A9955\"># Reset sum<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #6A9955\"># Choice 2: Exclude the current element<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    backtrack(subset, index + <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">, Sum)  <\/span><span style=\"color: #6A9955\"># Recurse without adding<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">result = []                     <\/span><span style=\"color: #6A9955\"># List to store all valid subsequences<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">nums = [<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">2<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">3<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">4<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">3<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">2<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">]  <\/span><span style=\"color: #6A9955\"># Example array<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">k = <\/span><span style=\"color: #B5CEA8\">3<\/span><span style=\"color: #D4D4D4\">                           <\/span><span style=\"color: #6A9955\"># Target sum<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">backtrack([], <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">)             <\/span><span style=\"color: #6A9955\"># Start backtracking<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">print<\/span><span style=\"color: #D4D4D4\">(result)                   <\/span><span style=\"color: #6A9955\"># Print the result<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#1E1E1E;color:#c7c7c7;font-size:12px;line-height:1;position:relative\">Python<\/span><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-code-explanation\">Code Explanation<\/h3>\n\n\n\n<p>The&nbsp;<code>backtrack<\/code>&nbsp;function builds subsequences by making choices at each index. It first tries including the current number (append to subset, add to sum, recurse). Then, it undoes that choice (pop from subset) and tries excluding it (just recurse). If the sum hits K exactly, it saves a copy of the subset. If the sum goes over K or we reach the end, it stops that path. This way, we explore all combinations without duplicates, and the copy ensures each valid subset is stored safely before further changes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5-time-and-space-complexity\">Time and Space Complexity<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Time Complexity:<\/strong>&nbsp;O(2^n) &#8211; In the worst case, we explore all possible subsequences (2^n), but pruning (when sum &gt; K) can reduce this in practice.<\/li>\n\n\n\n<li><strong>Space Complexity:<\/strong>&nbsp;O(n) &#8211; The recursion stack can go up to depth n, plus space for the current subset.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"6-simplifying-it\">Simplifying It<\/h2>\n\n\n\n<p>Backtracking is your &#8220;trial and error&#8221; friend for problems with choices. It&#8217;s like trying on clothes: pick one (include), see if it fits your style (sum==K), if not, take it off (backtrack) and try without it. You keep going until you&#8217;ve tried all outfits (reach the end). It&#8217;s powerful because it systematically covers all options without repeating work, and the &#8220;undo&#8221; step (pop) lets you reuse the same subset list efficiently. Great for subsets, combinations, or puzzles like Sudoku!<\/p>\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:\/\/codeanddebug.in\/course\/zero-to-hero-python-dsa\" target=\"_blank\" rel=\"noreferrer noopener\">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\" target=\"_blank\" rel=\"noreferrer noopener\">code@codeanddebug.in<\/a> or contact us at <a href=\"tel:+91-9712928220\" target=\"_blank\" rel=\"noreferrer noopener\">+91-9712928220<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Given an&nbsp;array of positive&nbsp;integers and&nbsp;a target sum&nbsp;K, generate and&nbsp;print all subsequences of the array&nbsp;whose sum equals&nbsp;K. A subsequence&nbsp;is a sequence&nbsp;that can be derived&nbsp;from the array&nbsp;by deleting some&nbsp;or no elements&nbsp;without changing&nbsp;the order of&nbsp;the remaining&nbsp;elements. Note:&nbsp;A subsequence is a subset that can be derived from an array by removing zero or more elements, without changing the order<\/p>\n","protected":false},"author":1,"featured_media":722,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[32,19],"class_list":{"0":"post-721","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-structures-and-algorithm","8":"category-intermediate","9":"tag-advance-recursion","10":"tag-medium"},"featured_image_src":"https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/07\/print-all-subsequences-with-sumK-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\/721","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=721"}],"version-history":[{"count":3,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/posts\/721\/revisions"}],"predecessor-version":[{"id":725,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/posts\/721\/revisions\/725"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/media\/722"}],"wp:attachment":[{"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/media?parent=721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/categories?post=721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/tags?post=721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}