{"id":967,"date":"2025-08-21T18:42:32","date_gmt":"2025-08-21T13:12:32","guid":{"rendered":"https:\/\/codeanddebug.in\/blog\/?p=967"},"modified":"2025-08-21T18:42:33","modified_gmt":"2025-08-21T13:12:33","slug":"job-sequencing-problem","status":"publish","type":"post","link":"https:\/\/codeanddebug.in\/blog\/job-sequencing-problem\/","title":{"rendered":"Job Sequencing Problem | Greedy Solution"},"content":{"rendered":"\n<p>The <strong>Job Sequencing Problem<\/strong> asks you to schedule jobs to maximize total profit, given that each job:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Takes exactly one unit of time<\/li>\n\n\n\n<li>Must finish by its <strong>deadline<\/strong><\/li>\n\n\n\n<li>Can be scheduled in any order, but at most one job can be done at a time<\/li>\n<\/ul>\n\n\n\n<p>You need to return:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The <strong>number of jobs<\/strong> done<\/li>\n\n\n\n<li>The <strong>maximum total profit<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Here&#8217;s the [<strong><a href=\"https:\/\/www.geeksforgeeks.org\/problems\/job-sequencing-problem-1587115620\/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\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">What does the problem say? (with examples)<\/h2>\n\n\n\n<p>You are given two arrays of equal length:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>deadline[i]<\/code> is the last time slot by which job <code>i<\/code> must be completed<\/li>\n\n\n\n<li><code>profit[i]<\/code> is the profit if job <code>i<\/code> is completed on or before its deadline<\/li>\n<\/ul>\n\n\n\n<p>Each job takes one unit of time. You must schedule jobs in a time grid of slots <code>1, 2, ..., max_deadline<\/code> so that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>No two jobs occupy the same slot<\/li>\n\n\n\n<li>A job scheduled in slot <code>t<\/code> must have <code>t &lt;= deadline[i]<\/code><\/li>\n\n\n\n<li>Total profit is maximized<\/li>\n<\/ul>\n\n\n\n<p><strong>Example<\/strong><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro 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(1 * 0.6 * .875rem);line-height:1.5rem;--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=\"deadline = [2, 1, 2, 1, 3]\nprofit   = [100, 19, 27, 25, 15]\n\nOne optimal schedule might pick three jobs within their deadlines for a total profit of 152.\" 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: #9CDCFE\">deadline<\/span><span style=\"color: #D4D4D4\"> = [2, 1, 2, 1, 3]<\/span><\/span>\n<span class=\"line\"><span style=\"color: #9CDCFE\">profit<\/span><span style=\"color: #D4D4D4\">   = [100, 19, 27, 25, 15]<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">One optimal schedule might pick three jobs within their deadlines for a total profit of 152.<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Intuition and Approach (Greedy)<\/h2>\n\n\n\n<p>A classic greedy strategy is:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Sort jobs by profit in descending order<\/strong> so we try to place the most profitable jobs first<\/li>\n\n\n\n<li>For each job in that order, try to place it in the <strong>latest available slot<\/strong> at or before its deadline<\/li>\n\n\n\n<li>If such a slot is found, schedule it and add its profit; otherwise, skip the job<\/li>\n<\/ol>\n\n\n\n<p>Why this works:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Taking the highest-profit jobs first gives the best chance to include them<\/li>\n\n\n\n<li>Placing a job as late as possible preserves earlier slots for other jobs with tighter deadlines<\/li>\n<\/ul>\n\n\n\n<p>Note: The straightforward implementation scans backward from <code>deadline<\/code> down to <code>1<\/code> to find a free slot. This can be slow if deadlines are large, and on some test sets this <strong>may cause TLE<\/strong>. It can be optimized with a <strong>Disjoint Set Union (DSU\/Union-Find)<\/strong> structure or other data structures, but here we keep your exact code and only add comments.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Code Implementation<\/h2>\n\n\n\n<p>Your provided greedy solution, unchanged except for clarifying comments:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro 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.5rem;--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=\"class Solution:\n    def jobSequencing(self, deadline, profit):\n        jobs = list(zip(deadline, profit))\n        # Sort by profit descending\n        jobs.sort(key=lambda x: x[1], reverse=True)\n\n        # Find maximum deadline to define slot array\n        max_dead = max(deadline) if deadline else 0\n        slots = [-1] * (max_dead + 1)  # 1-based indexing for convenience\n\n        total_profit = 0\n        count = 0\n\n        for d, p in jobs:\n            # scan from d down to 1 for a free slot\n            for slot in range(d, 0, -1):\n                if slots[slot] == -1:\n                    slots[slot] = 1  # mark slot filled\n                    total_profit += p\n                    count += 1\n                    break  # move to next job\n\n        return [count, total_profit]\" 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\">class<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #4EC9B0\">Solution<\/span><span style=\"color: #D4D4D4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">def<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">jobSequencing<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">self<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">deadline<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">profit<\/span><span style=\"color: #D4D4D4\">):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        jobs = <\/span><span style=\"color: #4EC9B0\">list<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #DCDCAA\">zip<\/span><span style=\"color: #D4D4D4\">(deadline, profit))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #6A9955\"># Sort by profit descending<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        jobs.sort(<\/span><span style=\"color: #9CDCFE\">key<\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #569CD6\">lambda<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">x<\/span><span style=\"color: #D4D4D4\">: x[<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">], <\/span><span style=\"color: #9CDCFE\">reverse<\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #569CD6\">True<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #6A9955\"># Find maximum deadline to define slot array<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        max_dead = <\/span><span style=\"color: #DCDCAA\">max<\/span><span style=\"color: #D4D4D4\">(deadline) <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> deadline <\/span><span style=\"color: #C586C0\">else<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #B5CEA8\">0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        slots = [-<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">] * (max_dead + <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">)  <\/span><span style=\"color: #6A9955\"># 1-based indexing for convenience<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        total_profit = <\/span><span style=\"color: #B5CEA8\">0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        count = <\/span><span style=\"color: #B5CEA8\">0<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #C586C0\">for<\/span><span style=\"color: #D4D4D4\"> d, p <\/span><span style=\"color: #C586C0\">in<\/span><span style=\"color: #D4D4D4\"> jobs:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #6A9955\"># scan from d down to 1 for a free slot<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #C586C0\">for<\/span><span style=\"color: #D4D4D4\"> slot <\/span><span style=\"color: #C586C0\">in<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">range<\/span><span style=\"color: #D4D4D4\">(d, <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">, -<\/span><span style=\"color: #B5CEA8\">1<\/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\"> slots[slot] == -<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                    slots[slot] = <\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #6A9955\"># mark slot filled<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                    total_profit += p<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                    count += <\/span><span style=\"color: #B5CEA8\">1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                    <\/span><span style=\"color: #C586C0\">break<\/span><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #6A9955\"># move to next job<\/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\"> [count, total_profit]<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Code explanation<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We pair each job as <code>(deadline, profit)<\/code> and <strong>sort by profit descending<\/strong> so we try the most valuable jobs first.<\/li>\n\n\n\n<li>We compute <code>max_dead<\/code> and build a <code>slots<\/code> array of length <code>max_dead + 1<\/code> using 1-based indexing. Each index represents a time slot.<\/li>\n\n\n\n<li>For each job <code>(d, p)<\/code> in sorted order:\n<ul class=\"wp-block-list\">\n<li>We try to place it at the <strong>latest possible free slot<\/strong> <code>slot<\/code> from <code>d<\/code> down to <code>1<\/code>.<\/li>\n\n\n\n<li>If we find a free slot, we occupy it and add <code>p<\/code> to <code>total_profit<\/code>.<\/li>\n\n\n\n<li>If not, we skip the job.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Finally, we return <code>[count, total_profit]<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>This directly implements the greedy idea of scheduling high-profit jobs as late as possible within their deadlines.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Time and Space Complexity<\/h2>\n\n\n\n<p><strong>Precise<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sorting jobs by profit: <strong>O(n log n)<\/strong><\/li>\n\n\n\n<li>For each job, scanning for a free slot takes at most <code>min(d_i, max_dead)<\/code> steps<br>Total slot scans: <strong>O(\u03a3 min(d_i, max_dead))<\/strong>, which in the worst case is <strong>O(n \u00b7 max_dead)<\/strong><\/li>\n\n\n\n<li>Overall time: <strong>O(n log n + n \u00b7 max_dead)<\/strong><\/li>\n<\/ul>\n\n\n\n<p><strong>Simplified<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If <code>max_dead<\/code> is proportional to <code>n<\/code>, worst-case time is <strong>O(n^2)<\/strong>, which can cause <strong>TLE<\/strong> on large inputs.<\/li>\n\n\n\n<li>Space: <code>slots<\/code> array of size <code>max_dead + 1<\/code> plus a list of jobs<br><strong>O(n + max_dead)<\/strong>, simplified to <strong>O(max_dead)<\/strong> extra space<\/li>\n<\/ul>\n\n\n\n<p><strong>Note on optimization (context only, not changing your code)<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Using a <strong>Disjoint Set Union<\/strong> to find the nearest free slot in approximately amortized <strong>\u03b1(n)<\/strong> time reduces the overall to <strong>O(n log n)<\/strong> (for sorting) with near-constant slot-finds, which typically avoids TLE.<\/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\">Conclusion<\/h2>\n\n\n\n<p>The greedy strategy of sorting by <strong>profit descending<\/strong> and placing each job in the <strong>latest available slot<\/strong> is correct and commonly taught. The provided implementation is simple and readable, but its backward slot scan can be <strong>O(n \u00b7 max_deadline)<\/strong> and may lead to <strong>TLE<\/strong> on large inputs. For production or strict time limits, consider an optimized slot-finding method such as <strong>Disjoint Set Union<\/strong> to bring the complexity down to <strong>O(n log n)<\/strong> while preserving the same greedy selection logic.<\/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>The Job Sequencing Problem asks you to schedule jobs to maximize total profit, given that each job: You need to return: Here&#8217;s the [Problem Link] to begin with. What does the problem say? (with examples) You are given two arrays of equal length: Each job takes one unit of time. You must schedule jobs in<\/p>\n","protected":false},"author":1,"featured_media":968,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[41,19],"class_list":{"0":"post-967","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-greedy-algorithm","10":"tag-medium"},"featured_image_src":"https:\/\/codeanddebug.in\/blog\/wp-content\/uploads\/2025\/08\/job-sequencing-problem-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\/967","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=967"}],"version-history":[{"count":1,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/posts\/967\/revisions"}],"predecessor-version":[{"id":969,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/posts\/967\/revisions\/969"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/media\/968"}],"wp:attachment":[{"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/media?parent=967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/categories?post=967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeanddebug.in\/blog\/wp-json\/wp\/v2\/tags?post=967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}