{"id":1989,"date":"2021-08-19T12:00:00","date_gmt":"2021-08-19T10:00:00","guid":{"rendered":"https:\/\/kindsonthegenius.com\/blog\/queen-attack-ii-simple-solution-hackerrank\/"},"modified":"2026-07-24T17:49:33","modified_gmt":"2026-07-24T15:49:33","slug":"queen-attack-ii-simple-solution-hackerrank","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/blog\/queen-attack-ii-simple-solution-hackerrank\/","title":{"rendered":"Queen\u2019s  Attack II Simple Solution \u2013 HackerRank"},"content":{"rendered":"<p>This is a simple and clear solution to the Queen\u2019s\u00a0 Attack 2 problem in HackerRank. It take just three steps as given below:<\/p>\n<ol>\n<li>determine all the cells the queen can attack without obstacles \u2013 <strong>queenCells<\/strong><\/li>\n<li>determine all the cells blocked by the obstacles \u2013 <strong>pawnCells<\/strong><\/li>\n<li>return <strong>queenCells \u2013 pawnCells<\/strong><\/li>\n<\/ol>\n<p>That\u2019s it! But seriously, what make this challenge a bit tasking is not only that there are obstacles, but we don\u2019t know how many of them.<\/p>\n<p>For simplicity, I have decided to use the name \u2018pawns\u2019 for \u2018obstacles\u2019.<\/p>\n<p>To solve this problem, we would need three helper functions:<\/p>\n<ol>\n<li><strong>getCellsQueenCanAttack()<\/strong> \u2013 The queen can attack diagonal and orthogonal. For orthogonal, the number of cells is 2n -2 for diagonals the number of cells is given by 2n \u2013 2 \u2013 |x \u2013 y| \u2013 |x + y \u2013 n \u2013 1|. Just add the two and you\u2019ll already pass tests for cases with no obstacles.<\/li>\n<li><strong>getRelativeLocation(queenX, queenY, pawnX, pawnY)<\/strong>: this function returns one of the position of the pawn relative to the queen. U for up, D for down, L for left, R for right, UL for upper left, DL for down left etc<\/li>\n<li><strong>getCellsBlockedByPawns()<\/strong> \u2013 this function will use the relative position of the pawn to determine how many cells lies between the pawn and the edge of the board.<\/li>\n<\/ol>\n<p>The original chess board setup is shown below:<\/p>\n<figure id=\"attachment_14768\" class=\"wp-caption aligncenter\" style=\"width: 542px;\" aria-describedby=\"caption-attachment-14768\"><a href=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Original-Chess-Board.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14768\" src=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Original-Chess-Board.png\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" srcset=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Original-Chess-Board.png 542w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Original-Chess-Board-300x259.png 300w\" alt=\"Original Board Setup\" width=\"542\" height=\"468\" \/><\/a>\n<figcaption id=\"caption-attachment-14768\" class=\"wp-caption-text\">Original Chess Board Setup<\/figcaption>\n<\/figure>\n<p>&nbsp;<\/p>\n<p>The board showing the CellsQueenCanAttack (cells the queen can attack). Note that the queen cannot attack herself.<\/p>\n<figure id=\"attachment_14770\" class=\"wp-caption aligncenter\" style=\"width: 542px;\" aria-describedby=\"caption-attachment-14770\"><a href=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Queen-Attack-Cells.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14770\" src=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Queen-Attack-Cells.png\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" srcset=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Queen-Attack-Cells.png 542w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Queen-Attack-Cells-300x259.png 300w\" alt=\"Board showing the QueenAttackCells\" width=\"542\" height=\"468\" \/><\/a>\n<figcaption id=\"caption-attachment-14770\" class=\"wp-caption-text\">Board showing the CellsQueenCanAttack \u2013 A total of 14 cells<\/figcaption>\n<\/figure>\n<p>&nbsp;<\/p>\n<p>The board showing only the pawns(obstacles) and the cells blocked by them is shown below:<\/p>\n<figure id=\"attachment_14769\" class=\"wp-caption aligncenter\" style=\"width: 542px;\" aria-describedby=\"caption-attachment-14769\"><a href=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Pawn-Blocked-Cells.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14769\" src=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Pawn-Blocked-Cells.png\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" srcset=\"https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Pawn-Blocked-Cells.png 542w, https:\/\/www.kindsonthegenius.com\/wp-content\/uploads\/2021\/08\/Pawn-Blocked-Cells-300x259.png 300w\" alt=\"Pawn Blocked Cells\" width=\"542\" height=\"468\" \/><\/a>\n<figcaption id=\"caption-attachment-14769\" class=\"wp-caption-text\">Pawn Blocked Cells \u2013\u00a0 a total of 4<\/figcaption>\n<\/figure>\n<p>&nbsp;<\/p>\n<p>You can see from the figures above that the result in this case is 14 \u2013 4 = 10<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Helper Function Descriptions<\/strong><\/h2>\n<p>So let\u2019s just look at the three helper functions:<\/p>\n<p><strong>getCellsQueenCanAttack(queenX, queenY, boardSize)<\/strong><\/p>\n<p>This function is given below. I already explained formula to you earlier. Here, n is the board size and the queen is at position (queenX, queenY).<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">def<\/span> <span style=\"color: #0066bb; font-weight: bold;\">getCellsQueenCanAttack<\/span>(queenX, queenY, boardSize):\n    orthognals <span style=\"color: #333333;\">=<\/span>  <span style=\"color: #0000dd; font-weight: bold;\">2<\/span> <span style=\"color: #333333;\">*<\/span> boardSize <span style=\"color: #333333;\">-<\/span> <span style=\"color: #0000dd; font-weight: bold;\">2<\/span>\n    diagonals <span style=\"color: #333333;\">=<\/span> <span style=\"color: #0000dd; font-weight: bold;\">2<\/span> <span style=\"color: #333333;\">*<\/span> boardSize <span style=\"color: #333333;\">-<\/span> <span style=\"color: #0000dd; font-weight: bold;\">2<\/span> <span style=\"color: #333333;\">-<\/span> <span style=\"color: #007020;\">abs<\/span>(queenX <span style=\"color: #333333;\">-<\/span> queenY) <span style=\"color: #333333;\">-<\/span> <span style=\"color: #007020;\">abs<\/span>(queenX <span style=\"color: #333333;\">+<\/span> queenY <span style=\"color: #333333;\">-<\/span> boardSize <span style=\"color: #333333;\">-<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span>)\n    <span style=\"color: #008800; font-weight: bold;\">return<\/span> orthognals <span style=\"color: #333333;\">+<\/span> diagonals\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>getRelativeLocation(queenX, queenY, pawnX, pawnY):<\/strong><\/p>\n<p>This function for a single pawn, returns a value indicating the relative position of the pawn to the queen.<\/p>\n<p>if both are in the same column (ie pawnY = queenY), then it could be \u2018U\u2019 or \u2018D\u2019 depending on the which is greater between queenX and pawnX. The same logic applies for all other positions. Watch the video for a detailed explanation:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">def<\/span> <span style=\"color: #0066bb; font-weight: bold;\">getRelativeLocation<\/span>(queenX, queenY, pawnX, pawnY):\n    <span style=\"color: #008800; font-weight: bold;\">if<\/span> pawnY <span style=\"color: #333333;\">==<\/span> queenY <span style=\"color: #000000; font-weight: bold;\">and<\/span> pawnX <span style=\"color: #333333;\">&lt;<\/span> queenX:\n        <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"background-color: #fff0f0;\">'L'<\/span>\n    <span style=\"color: #008800; font-weight: bold;\">if<\/span> pawnY <span style=\"color: #333333;\">==<\/span> queenY <span style=\"color: #000000; font-weight: bold;\">and<\/span> pawnX <span style=\"color: #333333;\">&gt;<\/span> queenX:\n        <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"background-color: #fff0f0;\">'R'<\/span>\n    <span style=\"color: #008800; font-weight: bold;\">if<\/span> queenX <span style=\"color: #333333;\">==<\/span> pawnX <span style=\"color: #000000; font-weight: bold;\">and<\/span> pawnY <span style=\"color: #333333;\">&gt;<\/span> queenY:\n        <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"background-color: #fff0f0;\">'U'<\/span>\n    <span style=\"color: #008800; font-weight: bold;\">if<\/span> queenX <span style=\"color: #333333;\">==<\/span> pawnX <span style=\"color: #000000; font-weight: bold;\">and<\/span> pawnY <span style=\"color: #333333;\">&lt;<\/span> queenY:\n        <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"background-color: #fff0f0;\">'D'<\/span>\n    <span style=\"color: #008800; font-weight: bold;\">if<\/span> <span style=\"color: #007020;\">abs<\/span>(queenX <span style=\"color: #333333;\">-<\/span> pawnX) <span style=\"color: #333333;\">==<\/span> <span style=\"color: #007020;\">abs<\/span>(queenY <span style=\"color: #333333;\">-<\/span> pawnY): #filter out irrelevant pawns\n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> pawnY <span style=\"color: #333333;\">&gt;<\/span> queenY <span style=\"color: #000000; font-weight: bold;\">and<\/span> pawnX <span style=\"color: #333333;\">&lt;<\/span> queenX:\n            <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"background-color: #fff0f0;\">'UL'<\/span>\n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> pawnY <span style=\"color: #333333;\">&gt;<\/span> queenY <span style=\"color: #000000; font-weight: bold;\">and<\/span> pawnX <span style=\"color: #333333;\">&gt;<\/span> queenX:\n            <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"background-color: #fff0f0;\">'UR'<\/span>\n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> pawnY <span style=\"color: #333333;\">&lt;<\/span> queenY <span style=\"color: #000000; font-weight: bold;\">and<\/span> pawnX <span style=\"color: #333333;\">&gt;<\/span> queenX:\n            <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"background-color: #fff0f0;\">'DR'<\/span>\n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> pawnY <span style=\"color: #333333;\">&lt;<\/span> queenY <span style=\"color: #000000; font-weight: bold;\">and<\/span> pawnX <span style=\"color: #333333;\">&lt;<\/span> queenX:\n            <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"background-color: #fff0f0;\">'DL'<\/span>\n<\/pre>\n<p>Note that some pawns are irrelevant. These are pawns that fall outside the diagonals and orthogonals of the queen.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>getCellsBlockedByPawns(<span style=\"font-family: 'Source Sans Pro', Graphik, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 1.125rem;\">queenX,\u00a0queenY,\u00a0pawns<\/span>)<\/strong><\/p>\n<p>This is the function that does more logic that previous two. So basically what it does is this: for each pawn, get its relative location, then determine how many cells lie between this pawn and the edge of the board. For each cell, add the cell position (x, y) to a set or tuples. This means there will be no repeated counts of the same cell.<\/p>\n<p>At the end just return the count of\u00a0 the set. This function is given below<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">def<\/span> <span style=\"color: #0066bb; font-weight: bold;\">getCellsBlockedByPawns<\/span>(queenX, queenY, pawns):\n    blockedCells <span style=\"color: #333333;\">=<\/span> <span style=\"color: #007020;\">set<\/span>()   \n    <span style=\"color: #008800; font-weight: bold;\">for<\/span> pawn <span style=\"color: #000000; font-weight: bold;\">in<\/span> pawns:\n        x <span style=\"color: #333333;\">=<\/span> pawn[<span style=\"color: #0000dd; font-weight: bold;\">1<\/span>]\n        y <span style=\"color: #333333;\">=<\/span> pawn[<span style=\"color: #0000dd; font-weight: bold;\">0<\/span>]\n        position <span style=\"color: #333333;\">=<\/span> getRelativeLocation(queenX, queenY, x, y)\n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> position <span style=\"color: #333333;\">==<\/span> <span style=\"background-color: #fff0f0;\">'U'<\/span>:\n            <span style=\"color: #008800; font-weight: bold;\">for<\/span> i <span style=\"color: #000000; font-weight: bold;\">in<\/span> <span style=\"color: #007020;\">range<\/span>(y, n<span style=\"color: #333333;\">+<\/span><span style=\"color: #0000dd; font-weight: bold;\">1<\/span>):\n                blockedCells<span style=\"color: #333333;\">.<\/span>add((i, x))\n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> position <span style=\"color: #333333;\">==<\/span> <span style=\"background-color: #fff0f0;\">'D'<\/span>:\n            <span style=\"color: #008800; font-weight: bold;\">for<\/span> i <span style=\"color: #000000; font-weight: bold;\">in<\/span> <span style=\"color: #007020;\">range<\/span>(y, <span style=\"color: #0000dd; font-weight: bold;\">0<\/span>, <span style=\"color: #333333;\">-<\/span><span style=\"color: #0000dd; font-weight: bold;\">1<\/span>):\n                blockedCells<span style=\"color: #333333;\">.<\/span>add((i, x))\n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> position <span style=\"color: #333333;\">==<\/span> <span style=\"background-color: #fff0f0;\">'L'<\/span>:\n            <span style=\"color: #008800; font-weight: bold;\">for<\/span> i <span style=\"color: #000000; font-weight: bold;\">in<\/span> <span style=\"color: #007020;\">range<\/span>(x, <span style=\"color: #0000dd; font-weight: bold;\">0<\/span>, <span style=\"color: #333333;\">-<\/span><span style=\"color: #0000dd; font-weight: bold;\">1<\/span>):\n                blockedCells<span style=\"color: #333333;\">.<\/span>add((y, i))\n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> position <span style=\"color: #333333;\">==<\/span> <span style=\"background-color: #fff0f0;\">'R'<\/span>:\n            <span style=\"color: #008800; font-weight: bold;\">for<\/span> i <span style=\"color: #000000; font-weight: bold;\">in<\/span> <span style=\"color: #007020;\">range<\/span>(x, n<span style=\"color: #333333;\">+<\/span><span style=\"color: #0000dd; font-weight: bold;\">1<\/span>):\n                blockedCells<span style=\"color: #333333;\">.<\/span>add((y, i))   \n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> position <span style=\"color: #333333;\">==<\/span> <span style=\"background-color: #fff0f0;\">'UL'<\/span>:\n            <span style=\"color: #008800; font-weight: bold;\">while<\/span> y <span style=\"color: #333333;\">&lt;=<\/span> n <span style=\"color: #000000; font-weight: bold;\">and<\/span> x <span style=\"color: #333333;\">&gt;<\/span> <span style=\"color: #0000dd; font-weight: bold;\">0<\/span>:\n                blockedCells<span style=\"color: #333333;\">.<\/span>add((y, x))\n                x <span style=\"color: #333333;\">-=<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span>\n                y <span style=\"color: #333333;\">+=<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span>   \n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> position <span style=\"color: #333333;\">==<\/span> <span style=\"background-color: #fff0f0;\">'UR'<\/span>:\n            <span style=\"color: #008800; font-weight: bold;\">while<\/span> y <span style=\"color: #333333;\">&lt;=<\/span> n <span style=\"color: #000000; font-weight: bold;\">and<\/span> x <span style=\"color: #333333;\">&lt;=<\/span> n:\n                blockedCells<span style=\"color: #333333;\">.<\/span>add((y, x))\n                x <span style=\"color: #333333;\">+=<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span>\n                y <span style=\"color: #333333;\">+=<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span> \n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> position <span style=\"color: #333333;\">==<\/span> <span style=\"background-color: #fff0f0;\">'DR'<\/span>:\n            <span style=\"color: #008800; font-weight: bold;\">while<\/span> y <span style=\"color: #333333;\">&gt;<\/span> <span style=\"color: #0000dd; font-weight: bold;\">0<\/span> <span style=\"color: #000000; font-weight: bold;\">and<\/span> x <span style=\"color: #333333;\">&lt;=<\/span> n:\n                blockedCells<span style=\"color: #333333;\">.<\/span>add((y, x))\n                x <span style=\"color: #333333;\">+=<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span>\n                y <span style=\"color: #333333;\">-=<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span>   \n        <span style=\"color: #008800; font-weight: bold;\">if<\/span> position <span style=\"color: #333333;\">==<\/span> <span style=\"background-color: #fff0f0;\">'DL'<\/span>:\n            <span style=\"color: #008800; font-weight: bold;\">while<\/span> y <span style=\"color: #333333;\">&gt;<\/span> <span style=\"color: #0000dd; font-weight: bold;\">0<\/span> <span style=\"color: #000000; font-weight: bold;\">and<\/span> x <span style=\"color: #333333;\">&gt;<\/span> <span style=\"color: #0000dd; font-weight: bold;\">0<\/span>:\n                blockedCells<span style=\"color: #333333;\">.<\/span>add((y, x))\n                x <span style=\"color: #333333;\">-=<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span>\n                y <span style=\"color: #333333;\">-=<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span> \n    <span style=\"color: #008800; font-weight: bold;\">return<\/span> <span style=\"color: #007020;\">len<\/span>(blockedCells)\n<\/pre>\n<p>&nbsp;<\/p>\n<h2><strong>QueenAttack() Function<\/strong><\/h2>\n<p>Finally we need to complete the QueenAttack\u00a0 as shown below.<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">def<\/span> <span style=\"color: #0066bb; font-weight: bold;\">queensAttack<\/span>(boardSize, k, queenY, queenX, pawns):\n    <span style=\"color: #888888;\"># Write your code here<\/span>\n    <span style=\"color: #008800; font-weight: bold;\">if<\/span> <span style=\"color: #007020;\">len<\/span>(pawns) <span style=\"color: #333333;\">==<\/span> <span style=\"color: #0000dd; font-weight: bold;\">0<\/span>:\n        <span style=\"color: #008800; font-weight: bold;\">return<\/span> getCellsQueenCanAttack(queenX, queenY, boardSize)\n    <span style=\"color: #008800; font-weight: bold;\">else<\/span>:\n        queenCells <span style=\"color: #333333;\">=<\/span> getCellsQueenCanAttack(queenX, queenY, boardSize)\n        pawnCells <span style=\"color: #333333;\">=<\/span> getCellsBlockedByPawns(queenX, queenY, pawns)\n        <span style=\"color: #008800; font-weight: bold;\">return<\/span> queenCells <span style=\"color: #333333;\">-<\/span> pawnCells\n<\/pre>\n<p>From the code, we first check if there are pawns(obstacles), if not, we simply return the number of cells queen can attack without obstacles. If however, there are obstacles, we calculated cell blocked by the obstacles. The we subtract.<\/p>\n<p>Hope this has helped you. I also recommend watching the video and feel free to reach me if you need more clarification.<\/p>\n<p>Queen\u2019s Attack II complete code in Github \u2013 <a href=\"https:\/\/github.com\/KindsonTheGenius\/QueenAttack2\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/KindsonTheGenius\/QueenAttack2<\/a><\/p>\n<h2 class=\"PDq2pG_selectionAnchorContainer\" data-section-id=\"qydd1w\" data-start=\"0\" data-end=\"16\">Final Thought<\/h2>\n<p data-start=\"18\" data-end=\"479\">The <strong data-start=\"22\" data-end=\"43\">Queen&#8217;s Attack II<\/strong> challenge is a great example of how breaking a complex problem into smaller, reusable functions can make your solution easier to understand, test, and optimize. Rather than trying to solve everything in a single block of code, identifying the cells the queen can attack, determining which cells are blocked, and combining the results produces a clean and efficient solution that scales well even when the number of obstacles increases.<\/p>\n<p data-start=\"481\" data-end=\"989\">As you continue solving coding challenges on HackerRank and similar platforms, focus on developing strong problem-solving habits, understanding algorithms, and writing modular code instead of memorizing solutions. If you&#8217;re looking to build these skills through structured learning, <a href=\"https:\/\/alkademy.com\/\" target=\"_blank\" rel=\"noopener\"><strong data-start=\"764\" data-end=\"776\">Alkademy<\/strong><\/a>, an AI-powered online learning platform, offers expert-led programming courses, AI-assisted learning tools, coding exercises, quizzes, and hands-on projects to help you become a more confident software developer.<\/p>\n<p data-start=\"991\" data-end=\"1261\" data-is-last-node=\"\" data-is-only-node=\"\">If this guide helped you understand the problem, try implementing the solution from scratch without referring to the code, experiment with different test cases, and then challenge yourself with more algorithm and data structure problems to strengthen your coding skills.<\/p>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a simple and clear solution to the Queen\u2019s\u00a0 Attack 2 problem in HackerRank. It take just three steps as given below: determine all &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[414],"tags":[],"class_list":["post-1989","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1989","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/comments?post=1989"}],"version-history":[{"count":3,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1989\/revisions"}],"predecessor-version":[{"id":2257,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/1989\/revisions\/2257"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media?parent=1989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/categories?post=1989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/tags?post=1989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}